From 1da6ca8fc1cff9b2e7365c86728fe56405e5427c Mon Sep 17 00:00:00 2001 From: Brad Nelson Date: Sat, 26 Feb 2022 09:45:06 -0800 Subject: [PATCH] Fix divide by zero for small screens. --- ueforth/common/grf_utils.fs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ueforth/common/grf_utils.fs b/ueforth/common/grf_utils.fs index 17eed5d..7bfc85b 100644 --- a/ueforth/common/grf_utils.fs +++ b/ueforth/common/grf_utils.fs @@ -84,9 +84,9 @@ grf definitions also internals : viewport { w h } width 2/ height 2/ translate 10000 width height */ 10000 w h */ < if - width w width h w */ h scale + width w width h w */ 1 max h scale else - height w h */ w height h scale + height w h */ 1 max w height h scale then w 2/ negate h 2/ negate translate ;