api: use dynamic shortcut for string.gfind

This commit is contained in:
shagu
2018-09-28 22:53:16 +02:00
parent 0d993806e6
commit 7ecac458ac
8 changed files with 26 additions and 20 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ pfUI:RegisterModule("pixelperfect", function ()
-- apply pixel dependent scaling
local resolution = GetCVar("gxResolution")
for screenwidth, screenheight in string.gfind(resolution, "(.+)x(.+)") do
for screenwidth, screenheight in gfind(resolution, "(.+)x(.+)") do
local screenheight = tonumber(screenheight) / 8
local scale = 768 / ( screenheight * conf )