From 817bc98964693aaf3cce822ac08e0861b18375cd Mon Sep 17 00:00:00 2001 From: terminx Date: Tue, 18 Dec 2012 18:07:28 +0000 Subject: [PATCH] Revert "Implement fullscreen 8bpp mode as a borderless, desktop-sized window when running on Windows, and expose an 8bpp mode to the game with the same size as the desktop when no fullscreen 8bpp modes are exposed by Windows. This is required on Windows 8 if we want to have any operation of classic mode in fullscreen, because Windows 8 drops the ability to set any mode other than 32bpp (leaving us largely in the same position we are when running under X)." This reverts commit 705cc72fed880e857a68c483fd3ff1ead3df044d. git-svn-id: https://svn.eduke32.com/eduke32@3305 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/src/winlayer.c | 41 ++++++++-------------------- 1 file changed, 11 insertions(+), 30 deletions(-) diff --git a/polymer/eduke32/build/src/winlayer.c b/polymer/eduke32/build/src/winlayer.c index 3956fe8c3..526f628f0 100644 --- a/polymer/eduke32/build/src/winlayer.c +++ b/polymer/eduke32/build/src/winlayer.c @@ -71,8 +71,6 @@ // undefine to restrict windowed resolutions to conventional sizes #define ANY_WINDOWED_SIZE -#define FAKE_FS(x, y, bpp) (bpp == 8 && x == desktopxdim && y == desktopydim) - static mutex_t m_initprintf; static int32_t winlayer_have_ATI = 0; @@ -1840,17 +1838,6 @@ void getvalidmodes(void) } } } - - for (i=0; i0; i++, n--) curpalettefaded[i].f = lpal.palPalEntry[i].peFlags = PC_NOCOLLAPSE; - - if (fullscreen && !FAKE_FS(xres, yres, bpp)) + + if (fullscreen) { if (!lpDDPalette) return -1; result = IDirectDrawPalette_SetEntries(lpDDPalette, 0, 0, 256, (LPPALETTEENTRY)lpal.palPalEntry); @@ -2118,7 +2105,7 @@ return 0; // static int32_t setgammaramp(WORD gt[3][256]) { - if (!fullscreen || bpp > 8 || FAKE_FS(xres, yres, bpp)) + if (!fullscreen || bpp > 8) { // GL and windowed mode use DIB method int32_t i; @@ -2191,9 +2178,8 @@ int32_t setgamma(void) static int32_t getgammaramp(WORD gt[3][256]) { - return -1; if (!hWindow) return -1; - if (!fullscreen || bpp > 8 || FAKE_FS(xres, yres, bpp)) + if (!fullscreen || bpp > 8) { int32_t i; HDC hDC = GetDC(hWindow); @@ -2992,13 +2978,8 @@ static BOOL CreateAppWindow(int32_t modenum) ShowWindow(hWindow, SW_HIDE); // so Windows redraws what's behind if the window shrinks } - - if (fs && FAKE_FS(width, height, bitspp)) - { - stylebitsex = 0; - stylebits = WS_POPUP | WS_MAXIMIZE | WS_VISIBLE | WS_CLIPSIBLINGS; - } - else if (fs) + + if (fs) { stylebitsex = WS_EX_TOPMOST; stylebits = WS_POPUP; @@ -3039,7 +3020,7 @@ static BOOL CreateAppWindow(int32_t modenum) } // resize the window - if (!fs && !FAKE_FS(width, height, bitspp)) + if (!fs) { rect.left = 0; rect.top = 0; @@ -3073,7 +3054,7 @@ static BOOL CreateAppWindow(int32_t modenum) SetWindowPos(hWindow, HWND_TOP, windowpos?windowx:x, windowpos?windowy:y, w, h, 0); // fullscreen? - if (!fs || FAKE_FS(width, height, bitspp)) + if (!fs) { if (bitspp > 8) {