summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f628f55)
raw | patch | inline | side by side (parent: f628f55)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Thu, 27 Jul 2023 18:43:47 +0000 (21:43 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Thu, 27 Jul 2023 18:43:47 +0000 (21:43 +0300) |
src/game/g_menu.pas | patch | blob | history |
diff --git a/src/game/g_menu.pas b/src/game/g_menu.pas
index f021de31011bce9e4b0ad6e4a79123d234e89a4b..ff6757f659ffcb5a4484f2d45588370a6591fcb1 100644 (file)
--- a/src/game/g_menu.pas
+++ b/src/game/g_menu.pas
if list <> nil then
begin
Items := list;
- ItemIndex := Length(list)
+ ItemIndex := -1; (* nothing selected *)
end
else
begin
TempResScale := Round(r_pixel_scale - 1);
with TGUISwitch(menu.GetControl('swResFactor')) do
- ItemIndex := Min(TempResScale, gRC_Width div 640 - 1);
+ ItemIndex := Max(Min(TempResScale, gRC_Width div 640 - 1), 0);
end;
procedure ProcApplyVideoOptions();