DEADSOFTWARE

NPOT *REALLY* fixed this time; also, added menu option
[d2df-sdl.git] / src / game / g_menu.pas
index 5c0452e464d9a2cbacec39794ed00767a04a1f28..0ac36062c5aff28f8a8174da449069e367ee87d3 100644 (file)
@@ -49,6 +49,7 @@ begin
     gBPP := 32;
   gVSync := TGUISwitch(menu.GetControl('swVSync')).ItemIndex = 0;
   gTextureFilter := TGUISwitch(menu.GetControl('swTextureFilter')).ItemIndex = 0;
+  glLegacyNPOT := not (TGUISwitch(menu.GetControl('swLegacyNPOT')).ItemIndex = 0);
 
   menu := TGUIMenu(g_GUI_GetWindow('OptionsSoundMenu').GetControl('mOptionsSoundMenu'));
 
@@ -214,6 +215,9 @@ begin
   with TGUISwitch(menu.GetControl('swVSync')) do
     if gVSync then ItemIndex := 0 else ItemIndex := 1;
 
+  with TGUISwitch(menu.GetControl('swLegacyNPOT')) do
+    if not glLegacyNPOT then ItemIndex := 0 else ItemIndex := 1;
+
   menu := TGUIMenu(g_GUI_GetWindow('OptionsSoundMenu').GetControl('mOptionsSoundMenu'));
 
   TGUIScroll(menu.GetControl('scSoundLevel')).Value := Round(gSoundLevel/16);
@@ -2333,6 +2337,12 @@ begin
       AddItem(_lc[I_MENU_YES]);
       AddItem(_lc[I_MENU_NO]);
     end;
+    with AddSwitch(_lc[I_MENU_VIDEO_LEGACY_COMPATIBLE]) do
+    begin
+      Name := 'swLegacyNPOT';
+      AddItem(_lc[I_MENU_NO]);
+      AddItem(_lc[I_MENU_YES]);
+    end;
     AddSpace();
     AddText(_lc[I_MENU_VIDEO_NEED_RESTART], Round(gScreenWidth*0.6));
     ReAlign();