DEADSOFTWARE

render: move textures loaders to render
[d2df-sdl.git] / src / game / g_menu.pas
index 61da4c4b89857cad02e905c8c9b78429db4b4f77..af62dbad5a1af745fd02e56be0cfb809237610e3 100644 (file)
@@ -43,7 +43,7 @@ var
 implementation
 
 uses
-  g_gui, g_textures, r_graphics, g_main, g_window, g_game, g_map,
+  g_gui, r_textures, r_graphics, g_game, g_map,
   g_base, g_basic, g_console, g_sound, g_gfx, g_player, g_options, g_weapons,
   e_log, SysUtils, CONFIG, g_playermodel, DateUtils,
   MAPDEF, Math, g_saveload,
@@ -107,7 +107,6 @@ procedure ProcApplyOptions();
 var
   menu: TGUIMenu;
   i: Integer;
-  ovs: Boolean;
 begin
   menu := TGUIMenu(g_GUI_GetWindow('OptionsVideoMenu').GetControl('mOptionsVideoMenu'));
 
@@ -116,10 +115,7 @@ begin
   else
     gBPP := 32;
 
-  ovs := gVSync;
   gVSync := TGUISwitch(menu.GetControl('swVSync')).ItemIndex = 0;
-  if (ovs <> gVSync) then
-    sys_EnableVSync(gVSync);
 
   gTextureFilter := TGUISwitch(menu.GetControl('swTextureFilter')).ItemIndex = 0;
   glNPOTOverride := not (TGUISwitch(menu.GetControl('swLegacyNPOT')).ItemIndex = 0);
@@ -3531,16 +3527,11 @@ end;
 procedure g_Menu_Init();
 begin
   MenuLoadData();
-  g_GUI_Init();
   CreateAllMenus();
 end;
 
 procedure g_Menu_Free();
 begin
-  g_GUI_Destroy();
-
-  e_WriteLog('Releasing menu data...', TMsgType.Notify);
-
   MenuFreeData();
 end;