X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;ds=inline;f=src%2Fgame%2Fg_menu.pas;h=ff6757f659ffcb5a4484f2d45588370a6591fcb1;hb=0f4c0818f5491fc65dd95aae33bfc3c603506305;hp=f021de31011bce9e4b0ad6e4a79123d234e89a4b;hpb=f628f55ae39e87c3a8e0c6204e3e8a847d683618;p=d2df-sdl.git diff --git a/src/game/g_menu.pas b/src/game/g_menu.pas index f021de3..ff6757f 100644 --- a/src/game/g_menu.pas +++ b/src/game/g_menu.pas @@ -1988,7 +1988,7 @@ begin if list <> nil then begin Items := list; - ItemIndex := Length(list) + ItemIndex := -1; (* nothing selected *) end else begin @@ -2004,7 +2004,7 @@ 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();