From 49fb0bd65b97c9bd6beabc7dfdb33eccafc25ecb Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Sun, 20 Jul 2014 17:28:25 +0200 Subject: [PATCH] Set WS_POPUP for fullscreen windows, rumoured to help certain gl drivers do the right thing. Remove an outdated comment. --- UI/EmuScreen.cpp | 1 - Windows/WndMainWindow.cpp | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/UI/EmuScreen.cpp b/UI/EmuScreen.cpp index 7235609490..1749aac268 100644 --- a/UI/EmuScreen.cpp +++ b/UI/EmuScreen.cpp @@ -520,7 +520,6 @@ void EmuScreen::processAxis(const AxisInput &axis, int direction) { if (!IsAnalogStickKey(resultsOpposite[i])) pspKey(resultsOpposite[i], KEY_UP); } - // Hm, why do we use a different way below? } else if (axisState == 0) { // Release both directions, trying to deal with some erratic controllers that can cause it to stick. for (size_t i = 0; i < results.size(); i++) { diff --git a/Windows/WndMainWindow.cpp b/Windows/WndMainWindow.cpp index 5ca92a273f..39df566243 100644 --- a/Windows/WndMainWindow.cpp +++ b/Windows/WndMainWindow.cpp @@ -320,6 +320,9 @@ namespace MainWindow if (!goingFullscreen) { // Put caption and border styles back. dwOldStyle = ::GetWindowLong(hWnd, GWL_STYLE); + + dwOldStyle &= ~WS_POPUP; + dwNewStyle = dwOldStyle | WS_CAPTION | WS_THICKFRAME | WS_SYSMENU; // Put back the menu bar. @@ -331,6 +334,9 @@ namespace MainWindow // Remove caption and border styles. dwOldStyle = ::GetWindowLong(hWnd, GWL_STYLE); dwNewStyle = dwOldStyle & ~(WS_CAPTION | WS_THICKFRAME | WS_SYSMENU); + + // Add WS_POPUP + dwNewStyle |= WS_POPUP; } ::SetWindowLong(hWnd, GWL_STYLE, dwNewStyle);