mirror of
https://git.code.sf.net/p/quake/newtree
synced 2025-05-10 22:30:37 +00:00
Added -brokenpopup to allow alt-tabbing with some broken video drivers,
until I've found a way to avoid the bug. Also, fixed one crash, so instead of crashing, we notify user that its time to upgrade drivers :-)
This commit is contained in:
parent
319d403c25
commit
d28d3d3df9
1 changed files with 16 additions and 3 deletions
|
@ -307,6 +307,8 @@ VID_SetFullDIBMode (int modenum)
|
||||||
int lastmodestate, width, height;
|
int lastmodestate, width, height;
|
||||||
RECT rect;
|
RECT rect;
|
||||||
|
|
||||||
|
memset(&gdevmode,0,sizeof(gdevmode));
|
||||||
|
|
||||||
if (!leavecurrentmode) {
|
if (!leavecurrentmode) {
|
||||||
gdevmode.dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT;
|
gdevmode.dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT;
|
||||||
gdevmode.dmBitsPerPel = modelist[modenum].bpp;
|
gdevmode.dmBitsPerPel = modelist[modenum].bpp;
|
||||||
|
@ -331,7 +333,12 @@ VID_SetFullDIBMode (int modenum)
|
||||||
DIBWidth = modelist[modenum].width;
|
DIBWidth = modelist[modenum].width;
|
||||||
DIBHeight = modelist[modenum].height;
|
DIBHeight = modelist[modenum].height;
|
||||||
|
|
||||||
WindowStyle = WS_POPUP;
|
// fixme: some drivers have broken FS popup window handling
|
||||||
|
// until I find way around it, or find some other cause for it
|
||||||
|
// this is way to avoid it
|
||||||
|
|
||||||
|
if (COM_CheckParm ("-brokenpopup")) WindowStyle = 0;
|
||||||
|
else WindowStyle = WS_POPUP;
|
||||||
ExWindowStyle = 0;
|
ExWindowStyle = 0;
|
||||||
|
|
||||||
rect = WindowRect;
|
rect = WindowRect;
|
||||||
|
@ -911,8 +918,14 @@ AppActivate (BOOL fActive, BOOL minimize)
|
||||||
IN_HideMouse ();
|
IN_HideMouse ();
|
||||||
if (vid_canalttab && vid_wassuspended) {
|
if (vid_canalttab && vid_wassuspended) {
|
||||||
vid_wassuspended = false;
|
vid_wassuspended = false;
|
||||||
ChangeDisplaySettings (&gdevmode, CDS_FULLSCREEN);
|
|
||||||
ShowWindow (mainwindow, SW_SHOWNORMAL);
|
if (ChangeDisplaySettings (&gdevmode, CDS_FULLSCREEN) !=
|
||||||
|
DISP_CHANGE_SUCCESSFUL) {
|
||||||
|
IN_ShowMouse ();
|
||||||
|
Sys_Error ("Couldn't set fullscreen DIB mode (try upgrading your video drivers)");
|
||||||
|
}
|
||||||
|
ShowWindow (mainwindow, SW_SHOWNORMAL);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ((modestate == MS_WINDOWED) && _windowed_mouse->int_val
|
else if ((modestate == MS_WINDOWED) && _windowed_mouse->int_val
|
||||||
|
|
Loading…
Reference in a new issue