]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - vid_wgl.c
playvideo and cd loop/cd play commands now call Host_StartVideo (this fixes a crash...
[xonotic/darkplaces.git] / vid_wgl.c
index 1595e798afa9ec42efceb7b436cecaa3ab7142d4..46589db67637c0c2c5c0b1430ec736e860e63039 100644 (file)
--- a/vid_wgl.c
+++ b/vid_wgl.c
@@ -88,7 +88,7 @@ static HGLRC baseRC;
 
 //HWND WINAPI InitializeWindow (HINSTANCE hInstance, int nCmdShow);
 
-static int vid_isfullscreen;
+static qboolean vid_isfullscreen;
 
 //void VID_MenuDraw (void);
 //void VID_MenuKey (int key);
@@ -314,7 +314,7 @@ void VID_Finish (void)
 
 // handle the mouse state when windowed if that's changed
        vid_usemouse = false;
-       if (vid_mouse.integer && !key_consoleactive)
+       if (vid_mouse.integer && !key_consoleactive && !cls.demoplayback)
                vid_usemouse = true;
        if (vid_isfullscreen)
                vid_usemouse = true;
@@ -452,8 +452,6 @@ void ClearAllStates (void)
        IN_ClearStates ();
 }
 
-extern qboolean host_loopactive;
-
 void AppActivate(BOOL fActive, BOOL minimize)
 /****************************************************************************
 *
@@ -693,7 +691,18 @@ int VID_GetGamma(unsigned short *ramps)
 
 static HINSTANCE gldll;
 
-int GL_OpenLibrary(const char *name)
+static void GL_CloseLibrary(void)
+{
+       FreeLibrary(gldll);
+       gldll = 0;
+       gl_driver[0] = 0;
+       qwglGetProcAddress = NULL;
+       gl_extensions = "";
+       gl_platform = "";
+       gl_platformextensions = "";
+}
+
+static int GL_OpenLibrary(const char *name)
 {
        Con_Printf("Loading OpenGL driver %s\n", name);
        GL_CloseLibrary();
@@ -706,17 +715,6 @@ int GL_OpenLibrary(const char *name)
        return true;
 }
 
-void GL_CloseLibrary(void)
-{
-       FreeLibrary(gldll);
-       gldll = 0;
-       gl_driver[0] = 0;
-       qwglGetProcAddress = NULL;
-       gl_extensions = "";
-       gl_platform = "";
-       gl_platformextensions = "";
-}
-
 void *GL_GetProcAddress(const char *name)
 {
        void *p = NULL;