Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions luaui/Widgets/gui_options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@
isPotatoGpu = true
gpuMem = 0 -- AMD integrated can report incorrect gpuMemorySize, so set to 0 to avoid false positives for low VRAM
end
elseif string.find(glRendererLower, "apple m") then
-- Apple Silicon via zink reports vendor Mesa: "zink Vulkan 1.3(Apple M3 Max (MESA_KOSMICKRISP))"
else
-- Unknown/Mesa vendor without specific detection — assume low-end
isPotatoGpu = true
Expand Down Expand Up @@ -188,13 +190,13 @@

local edgeMoveWidth = tonumber(Spring.GetConfigFloat("EdgeMoveWidth", 1) or 0.02)

local defaultMapSunPos = { gl.GetSun("pos") }

Check warning on line 193 in luaui/Widgets/gui_options.lua

View workflow job for this annotation

GitHub Actions / emmylua_check

missing-parameter

expected 2 parameters but found 1. missing parameter: mode
local defaultSunLighting = {
groundAmbientColor = { gl.GetSun("ambient") },

Check warning on line 195 in luaui/Widgets/gui_options.lua

View workflow job for this annotation

GitHub Actions / emmylua_check

missing-parameter

expected 2 parameters but found 1. missing parameter: mode
unitAmbientColor = { gl.GetSun("ambient", "unit") },
groundDiffuseColor = { gl.GetSun("diffuse") },

Check warning on line 197 in luaui/Widgets/gui_options.lua

View workflow job for this annotation

GitHub Actions / emmylua_check

missing-parameter

expected 2 parameters but found 1. missing parameter: mode
unitDiffuseColor = { gl.GetSun("diffuse", "unit") },
groundSpecularColor = { gl.GetSun("specular") },

Check warning on line 199 in luaui/Widgets/gui_options.lua

View workflow job for this annotation

GitHub Actions / emmylua_check

missing-parameter

expected 2 parameters but found 1. missing parameter: mode
unitSpecularColor = { gl.GetSun("specular", "unit") },
}

Expand Down Expand Up @@ -250,7 +252,7 @@

local function getRestartWithStateScript()
local startPosTypePattern = "([Ss][Tt][Aa][Rr][Tt][Pp][Oo][Ss][Tt][Yy][Pp][Ee]%s*=%s*)%d+(%s*;)"
local script, replacements = startScript:gsub(startPosTypePattern, function(prefix, suffix)

Check warning on line 255 in luaui/Widgets/gui_options.lua

View workflow job for this annotation

GitHub Actions / emmylua_check

param-type-mismatch

expected `(string|number)` but found `string?`.

Check warning on line 255 in luaui/Widgets/gui_options.lua

View workflow job for this annotation

GitHub Actions / emmylua_check

need-check-nil

startScript may be nil
return prefix .. "0" .. suffix
end, 1)
if replacements == 0 then
Expand Down Expand Up @@ -317,12 +319,12 @@
local function setEngineFont()
local relativesize = 1
--"fonts/FreeSansBold.otf"
Spring.SetConfigInt("SmallFontSize", fontfileSize * fontfileScale * relativesize)

Check warning on line 322 in luaui/Widgets/gui_options.lua

View workflow job for this annotation

GitHub Actions / emmylua_check

param-type-mismatch

expected `integer` but found `number`.
Spring.SetConfigInt("SmallFontOutlineWidth", fontfileOutlineSize * fontfileScale * relativesize * 0.85)

Check warning on line 323 in luaui/Widgets/gui_options.lua

View workflow job for this annotation

GitHub Actions / emmylua_check

param-type-mismatch

expected `integer` but found `number`.
Spring.SetConfigInt("SmallFontOutlineWeight", 2)

Spring.SetConfigInt("FontSize", fontfileSize * fontfileScale * relativesize)

Check warning on line 326 in luaui/Widgets/gui_options.lua

View workflow job for this annotation

GitHub Actions / emmylua_check

param-type-mismatch

expected `integer` but found `number`.
Spring.SetConfigInt("FontOutlineWidth", fontfileOutlineSize * fontfileScale * relativesize * 0.85)

Check warning on line 327 in luaui/Widgets/gui_options.lua

View workflow job for this annotation

GitHub Actions / emmylua_check

param-type-mismatch

expected `integer` but found `number`.
Spring.SetConfigInt("FontOutlineWeight", 2)

Spring.SendCommands("font " .. Spring.GetConfigString("bar_font2", "Exo2-SemiBold.otf"))
Expand Down
Loading