From 8eacd04e2e9afa6ac4d795f3dce887600c16e57e Mon Sep 17 00:00:00 2001 From: FajsiEx Date: Mon, 9 Aug 2021 18:37:55 +0200 Subject: [PATCH] / apply temporary patch for downloadscreen crashing on small resolutions --- scripts/downloadscreen.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/downloadscreen.lua b/scripts/downloadscreen.lua index eb89aad..8accd7b 100644 --- a/scripts/downloadscreen.lua +++ b/scripts/downloadscreen.lua @@ -7,8 +7,8 @@ local diffColors = {{50,50,127}, {50,127,50}, {127,50,50}, {127, 50, 127}} local entryW = 770 local entryH = 320 local resX,resY = game.GetResolution() -local xCount = math.floor(resX / entryW) -local yCount = math.floor(resY / entryH) +local xCount = math.max(1, math.floor(resX / entryW)) +local yCount = math.max(1, math.floor(resY / entryH)) local xOffset = (resX - xCount * entryW) / 2 local cursorPos = 0 local cursorPosX = 0