]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - host.c
Gecko: load OffscreenGecko dynamically
[xonotic/darkplaces.git] / host.c
diff --git a/host.c b/host.c
index 1a3b44495ea107142ed701c0b0cb21b3f9f2aecc..62192c141a30de3868e29ca405fa15c75af1fe94 100644 (file)
--- a/host.c
+++ b/host.c
@@ -220,15 +220,9 @@ Host_SaveConfig_f
 Writes key bindings and archived cvars to config.cfg
 ===============
 */
-void Host_SaveConfig_f(void)
+void Host_SaveConfig_to(const char *file)
 {
        qfile_t *f;
-       const char *file = "config.cfg";
-
-       if(Cmd_Argc() >= 2) {
-               file = Cmd_Argv(1);
-               Con_Printf("Saving to %s\n", file);
-       }
 
 // dedicated servers initialize the host but don't parse and set the
 // config.cfg cvars
@@ -248,7 +242,21 @@ void Host_SaveConfig_f(void)
                FS_Close (f);
        }
 }
+void Host_SaveConfig(void)
+{
+       Host_SaveConfig_to("config.cfg");
+}
+void Host_SaveConfig_f(void)
+{
+       const char *file = "config.cfg";
+
+       if(Cmd_Argc() >= 2) {
+               file = Cmd_Argv(1);
+               Con_Printf("Saving to %s\n", file);
+       }
 
+       Host_SaveConfig_to(file);
+}
 
 /*
 ===============
@@ -849,9 +857,7 @@ void Host_Main(void)
                        //ui_update();
 
                        CL_Video_Frame();
-#ifdef SUPPORT_GECKO
                        CL_Gecko_Frame();
-#endif
 
                        CL_UpdateScreen();
 
@@ -865,7 +871,7 @@ void Host_Main(void)
                                cl.csqc_usecsqclistener = false;
                        }
                        else
-                               S_Update(&r_view.matrix);
+                               S_Update(&r_refdef.view.matrix);
 
                        CDAudio_Update();
 
@@ -1114,10 +1120,7 @@ static void Host_Init (void)
 
        if (!sv.active && !cls.demoplayback && !cls.connect_trying)
        {
-               if (gamemode == GAME_NEXUIZ)
-                       Cbuf_AddText("togglemenu\nplayvideo logo\ncd loop 1\n");
-               else
-                       Cbuf_AddText("togglemenu\n");
+               Cbuf_AddText("togglemenu\n");
                Cbuf_Execute();
        }
 
@@ -1167,12 +1170,10 @@ void Host_Shutdown(void)
        // AK shutdown PRVM
        // AK hmm, no PRVM_Shutdown(); yet
 
-#ifdef SUPPORT_GECKO
        CL_Gecko_Shutdown();
-#endif
        CL_Video_Shutdown();
 
-       Host_SaveConfig_f();
+       Host_SaveConfig();
 
        CDAudio_Shutdown ();
        S_Terminate ();