]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' of git://git.xonotic.org/xonotic/xonotic-data.pk3dir
authorRudolf Polzer <divverent@xonotic.org>
Sun, 16 Oct 2011 12:22:02 +0000 (14:22 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Sun, 16 Oct 2011 12:22:02 +0000 (14:22 +0200)
qcsrc/menu/gamecommand.qc
qcsrc/menu/menu.qc
qcsrc/menu/menu.qh
qcsrc/menu/xonotic/dialog_settings_video.c

index f3d780b6f55fe7edf13e8e18129b44199b110a6a..83ef53762c914ab5f5ca4cbd255547d14163f7a8 100644 (file)
@@ -74,8 +74,7 @@ void GameCommand(string theCommand)
 
        if(argv(0) == "sync")
        {
-               loadAllCvars(main);
-               updateCompression();
+               m_sync();
                return;
        }
 
@@ -119,18 +118,6 @@ void GameCommand(string theCommand)
                return;
        }
 
-       if(argv(0) == "setresolution")
-       {
-               updateConwidths();
-               return;
-       }
-
-       if(argv(0) == "setcompression")
-       {
-               updateCompression();
-               return;
-       }
-
        if(argv(0) == "curl")
        {
                float do_exec;
index c8c3b62f4f61225c1493722248c19016eeaa15d5..f5c0f6da5d2b36fdce817b36a8e4d483272a8a7f 100644 (file)
@@ -18,6 +18,14 @@ float menuMouseMode;
 
 void SUB_Null() { }
 
+void m_sync()
+{
+       updateCompression();
+       updateConwidths();
+
+       loadAllCvars(main);
+}
+
 void m_init()
 {
        cvar_set("_menu_alpha", "0");
@@ -169,6 +177,8 @@ void m_init_delayed()
        menuShiftState = 0;
        menuMousePos = '0.5 0.5 0';
 
+       m_sync();
+
        if(Menu_Active)
                m_display(); // delayed menu display
 }
index e42595e58265e8ba3553a2a3fd698931f2b6a2c6..ab812437a00eba147f08570ca81e8541ea739249 100644 (file)
@@ -41,3 +41,5 @@ void SUB_Null();
 float preMenuInit(); // you have to define this for pre-menu initialization. Return 0 if initialization needs to be retried a frame later, 1 if it succeeded.
 void preMenuDraw(); // this is run before the menu is drawn. You may put some stuff there that has to be done every frame.
 void postMenuDraw(); // this is run just after the menu is drawn (or not). Useful to draw something over everything else.
+
+void m_sync();
index b1907b604c6f3dc09ed0783e13ef1110265c3e19..770811ec1e8424a5c92d6ad8798d5676983e6ab4 100644 (file)
@@ -106,6 +106,6 @@ void XonoticVideoSettingsTab_fill(entity me)
                me.TD(me, 1, 2, e = makeXonoticSlider(0.5, 2.0, 0.05, "r_hdr_scenebrightness"));
 
        me.gotoRC(me, me.rows - 1, 0);
-               me.TD(me, 1, me.columns, makeXonoticCommandButton(_("Apply immediately"), '0 0 0', "menu_cmd setresolution; vid_restart; menu_restart; togglemenu; defer 0.1 \"menu_cmd videosettings\"", COMMANDBUTTON_APPLY));
+               me.TD(me, 1, me.columns, makeXonoticCommandButton(_("Apply immediately"), '0 0 0', "menu_cmd sync; vid_restart; menu_restart; togglemenu; defer 0.1 \"menu_cmd videosettings\"", COMMANDBUTTON_APPLY));
 }
 #endif