From 9c81fa155c7dce2833da36f0a56970d84dbdc036 Mon Sep 17 00:00:00 2001 From: terminx Date: Wed, 11 Jun 2008 18:52:39 +0000 Subject: [PATCH] suppress video mode switch messages when alt-tabbing out of fullscreen git-svn-id: https://svn.eduke32.com/eduke32@799 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/build/src/winlayer.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/polymer/build/src/winlayer.c b/polymer/build/src/winlayer.c index e907bcbc6..81f48967f 100644 --- a/polymer/build/src/winlayer.c +++ b/polymer/build/src/winlayer.c @@ -115,6 +115,7 @@ char modechange=1, repaintneeded=0; char offscreenrendering=0; int glcolourdepth=32; char videomodereset = 0; +char silentvideomodeswitch = 0; // input and events char inputdevices=0; @@ -2094,8 +2095,9 @@ int setvideomode(int x, int y, int c, int fs) gammabrightness = 0; } - initprintf("Setting video mode %dx%d (%d-bit %s)\n", - x,y,c, ((fs&1) ? "fullscreen" : "windowed")); + if (!silentvideomodeswitch) + initprintf("Setting video mode %dx%d (%d-bit %s)\n", + x,y,c, ((fs&1) ? "fullscreen" : "windowed")); if (CreateAppWindow(modenum)) return -1; @@ -4008,6 +4010,7 @@ static LRESULT CALLBACK WndProcCallback(HWND hWnd, UINT uMsg, WPARAM wParam, LPA regrabmouse = 1; } realfs = fullscreen; + silentvideomodeswitch = 1; setgamemode(!fullscreen,xdim,ydim,bpp); ShowWindow(hWindow, SW_MINIMIZE); } @@ -4022,6 +4025,7 @@ static LRESULT CALLBACK WndProcCallback(HWND hWnd, UINT uMsg, WPARAM wParam, LPA SetForegroundWindow(hWindow); SetFocus(hWindow); setgamemode(realfs,xdim,ydim,bpp); + silentvideomodeswitch = 0; realfs = 0; } }