summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/Frame.cpp
diff options
context:
space:
mode:
authorshuffle2 <godisgovernment@gmail.com>2014-08-12 14:55:18 -0700
committershuffle2 <godisgovernment@gmail.com>2014-08-12 14:55:18 -0700
commit7b9c8da468b2a92aa8ec7677bf7766d7491eb214 (patch)
tree07dc72bf8d9872fde917adb766cc7e86894dec19 /Source/Core/DolphinWX/Frame.cpp
parent6a336f66a89820f3f0c664c0b261b1d606ba28cb (diff)
parentb67ec4ea58ddf3af9fe1b6dd06a3e2c8e3a012c8 (diff)
Merge pull request #726 from Armada651/ogl-exclusive
CFrame: Add fullscreen window styles to enable exclusive mode in OpenGL.
Diffstat (limited to 'Source/Core/DolphinWX/Frame.cpp')
-rw-r--r--Source/Core/DolphinWX/Frame.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/Source/Core/DolphinWX/Frame.cpp b/Source/Core/DolphinWX/Frame.cpp
index c118533625..26e825b2f5 100644
--- a/Source/Core/DolphinWX/Frame.cpp
+++ b/Source/Core/DolphinWX/Frame.cpp
@@ -191,6 +191,25 @@ WXLRESULT CRenderFrame::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lPa
}
#endif
+bool CRenderFrame::ShowFullScreen(bool show, long style)
+{
+ if (show)
+ {
+ // OpenGL requires the pop-up style to activate exclusive mode.
+ SetWindowStyle((GetWindowStyle() & ~wxDEFAULT_FRAME_STYLE) | wxPOPUP_WINDOW);
+ }
+
+ bool result = wxTopLevelWindow::ShowFullScreen(show, style);
+
+ if (!show)
+ {
+ // Restore the default style.
+ SetWindowStyle((GetWindowStyle() & ~wxPOPUP_WINDOW) | wxDEFAULT_FRAME_STYLE);
+ }
+
+ return result;
+}
+
// event tables
// Notice that wxID_HELP will be processed for the 'About' menu and the toolbar
// help button.