void IN_StartupJoystick (void);
void Joy_AdvancedUpdate_f (void);
void IN_JoyMove (usercmd_t *cmd);
+void IN_StartupMouse (void);
/*
================
break;
- case WM_DESTROY:
- {
- if (mainwindow)
- DestroyWindow (mainwindow);
-
- PostQuitMessage (0);
- }
- break;
+ //case WM_DESTROY:
+ // PostQuitMessage (0);
+ // break;
case MM_MCINOTIFY:
lRet = CDAudio_MessageHandler (hWnd, uMsg, wParam, lParam);
HGLRC baseRC;
int CenterX, CenterY;
const char *gldrivername;
-
+
if (vid_initialized)
Sys_Error("VID_InitMode called when video is already initialised\n");
+ // if stencil is enabled, ask for alpha too
if (stencil)
+ {
pfd.cStencilBits = 8;
+ pfd.cAlphaBits = 8;
+ }
else
+ {
pfd.cStencilBits = 0;
+ pfd.cAlphaBits = 0;
+ }
gldrivername = "opengl32.dll";
i = COM_CheckParm("-gl_driver");
mainwindow = CreateWindowEx (ExWindowStyle, "DarkPlacesWindowClass", gamename, WindowStyle, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, NULL, NULL, global_hInstance, NULL);
if (!mainwindow)
{
+ Con_Printf("CreateWindowEx(%d, %s, %s, %d, %d, %d, %d, %d, %p, %p, %d, %p) failed\n", ExWindowStyle, "DarkPlacesWindowClass", gamename, WindowStyle, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, NULL, NULL, global_hInstance, NULL);
VID_Shutdown();
- Con_Printf("CreateWindowEx(%d, %s, %s, %d, %d, %d, %d, %d, %p, %p, %d, %p) failed\n", ExWindowStyle, gamename, gamename, WindowStyle, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, NULL, NULL, global_hInstance, NULL);
return false;
}
HGLRC hRC = 0;
HDC hDC = 0;
- if (vid_initialized)
- {
- vid_initialized = false;
- IN_Shutdown();
-
- if (qwglGetCurrentContext)
- hRC = qwglGetCurrentContext();
-
- if (qwglGetCurrentDC)
- hDC = qwglGetCurrentDC();
-
- if (qwglMakeCurrent)
- qwglMakeCurrent(NULL, NULL);
-
- if (hRC && qwglDeleteContext)
- qwglDeleteContext(hRC);
-
- // close the library before we get rid of the window
- GL_CloseLibrary();
-
- if (hDC && mainwindow)
- ReleaseDC(mainwindow, hDC);
-
- if (vid_isfullscreen)
- ChangeDisplaySettings (NULL, 0);
-
- AppActivate(false, false);
-
- VID_RestoreSystemGamma();
- }
+ vid_initialized = false;
+ IN_Shutdown();
+ if (qwglGetCurrentContext)
+ hRC = qwglGetCurrentContext();
+ if (qwglGetCurrentDC)
+ hDC = qwglGetCurrentDC();
+ if (qwglMakeCurrent)
+ qwglMakeCurrent(NULL, NULL);
+ if (hRC && qwglDeleteContext)
+ qwglDeleteContext(hRC);
+ // close the library before we get rid of the window
+ GL_CloseLibrary();
+ if (hDC && mainwindow)
+ ReleaseDC(mainwindow, hDC);
+ if (vid_isfullscreen)
+ ChangeDisplaySettings (NULL, 0);
+ vid_isfullscreen = false;
+ AppActivate(false, false);
+ VID_RestoreSystemGamma();
+ if (mainwindow)
+ DestroyWindow(mainwindow);
+ mainwindow = 0;
}