Fix divide by zero for small screens.

This commit is contained in:
Brad Nelson
2022-02-26 09:45:06 -08:00
parent 267ca41574
commit 1da6ca8fc1

View File

@ -84,9 +84,9 @@ grf definitions also internals
: viewport { w h } : viewport { w h }
width 2/ height 2/ translate width 2/ height 2/ translate
10000 width height */ 10000 w h */ < if 10000 width height */ 10000 w h */ < if
width w width h w */ h scale width w width h w */ 1 max h scale
else else
height w h */ w height h scale height w h */ 1 max w height h scale
then then
w 2/ negate h 2/ negate translate w 2/ negate h 2/ negate translate
; ;