]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - vid_shared.c
Merge PR 'Small fixes (indices out of bounds)'
[xonotic/darkplaces.git] / vid_shared.c
index f2813eccbd563eae6591dc88a8dcbe90b3910171..0b5c2d389b2f2ae8063abc0fb620a25a98c1580c 100644 (file)
@@ -1360,7 +1360,7 @@ void VID_Shared_Init(void)
        //Cvar_RegisterVariable(&joy_x360_sensitivityroll);
 
 #ifdef WIN32
-       Sys_LoadLibrary(xinputdllnames, &xinputdll_dll, xinputdllfuncs);
+       Sys_LoadDependency(xinputdllnames, &xinputdll_dll, xinputdllfuncs);
 #endif
 
        Cmd_AddCommand(CF_CLIENT, "force_centerview", Force_CenterView_f, "recenters view (stops looking up/down)");
@@ -1470,12 +1470,6 @@ void VID_Restart_f(cmd_state_t *cmd)
        if (vid_commandlinecheck)
                return;
 
-       if (!vid_opened)
-       {
-               SCR_BeginLoadingPlaque(false);
-               return;
-       }
-
        Con_Printf("VID_Restart: changing from %s %dx%dx%dbpp%s, to %s %dx%dx%dbpp%s.\n",
                vid.mode.fullscreen ? "fullscreen" : "window", vid.mode.width, vid.mode.height, vid.mode.bitsperpixel, vid.mode.fullscreen && vid.mode.userefreshrate ? va(vabuf, sizeof(vabuf), "x%.2fhz", vid.mode.refreshrate) : "",
                vid_fullscreen.integer ? "fullscreen" : "window", vid_width.integer, vid_height.integer, vid_bitsperpixel.integer, vid_fullscreen.integer && vid_userefreshrate.integer ? va(vabuf, sizeof(vabuf), "x%.2fhz", vid_refreshrate.value) : "");
@@ -1487,6 +1481,8 @@ void VID_Restart_f(cmd_state_t *cmd)
                if (!VID_Mode(vid.mode.fullscreen, vid.mode.width, vid.mode.height, vid.mode.bitsperpixel, vid.mode.refreshrate, vid.mode.stereobuffer))
                        Sys_Error("Unable to restore to last working video mode");
        }
+
+       SCR_DeferLoadingPlaque(false);
        VID_OpenSystems();
 }
 
@@ -1501,7 +1497,7 @@ const char *vidfallbacks[][2] =
        {NULL, NULL}
 };
 
-// this is only called once by Host_StartVideo and again on each FS_GameDir_f
+// this is only called once by CL_StartVideo and again on each FS_GameDir_f
 void VID_Start(void)
 {
        int i = 0;