Limit Borderless Fullscreen to Windows systems.

This commit is contained in:
Jules Blok 2014-10-09 11:30:26 +02:00
parent 39f421d45d
commit 03e1bd0995
2 changed files with 6 additions and 0 deletions

View File

@ -187,19 +187,23 @@ WXLRESULT CRenderFrame::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lPa
bool CRenderFrame::ShowFullScreen(bool show, long style) bool CRenderFrame::ShowFullScreen(bool show, long style)
{ {
#if defined WIN32
if (show && !g_Config.bBorderlessFullscreen) if (show && !g_Config.bBorderlessFullscreen)
{ {
// OpenGL requires the pop-up style to activate exclusive mode. // OpenGL requires the pop-up style to activate exclusive mode.
SetWindowStyle((GetWindowStyle() & ~wxDEFAULT_FRAME_STYLE) | wxPOPUP_WINDOW); SetWindowStyle((GetWindowStyle() & ~wxDEFAULT_FRAME_STYLE) | wxPOPUP_WINDOW);
} }
#endif
bool result = wxTopLevelWindow::ShowFullScreen(show, style); bool result = wxTopLevelWindow::ShowFullScreen(show, style);
#if defined WIN32
if (!show) if (!show)
{ {
// Restore the default style. // Restore the default style.
SetWindowStyle((GetWindowStyle() & ~wxPOPUP_WINDOW) | wxDEFAULT_FRAME_STYLE); SetWindowStyle((GetWindowStyle() & ~wxPOPUP_WINDOW) | wxDEFAULT_FRAME_STYLE);
} }
#endif
return result; return result;
} }

View File

@ -588,9 +588,11 @@ VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string &title, con
szr_misc->Add(progressive_scan_checkbox); szr_misc->Add(progressive_scan_checkbox);
} }
#if defined WIN32
// Borderless Fullscreen // Borderless Fullscreen
borderless_fullscreen = CreateCheckBox(page_advanced, _("Borderless Fullscreen"), wxGetTranslation(borderless_fullscreen_desc), vconfig.bBorderlessFullscreen); borderless_fullscreen = CreateCheckBox(page_advanced, _("Borderless Fullscreen"), wxGetTranslation(borderless_fullscreen_desc), vconfig.bBorderlessFullscreen);
szr_misc->Add(borderless_fullscreen); szr_misc->Add(borderless_fullscreen);
#endif
wxStaticBoxSizer* const group_misc = new wxStaticBoxSizer(wxVERTICAL, page_advanced, _("Misc")); wxStaticBoxSizer* const group_misc = new wxStaticBoxSizer(wxVERTICAL, page_advanced, _("Misc"));
szr_advanced->Add(group_misc, 0, wxEXPAND | wxALL, 5); szr_advanced->Add(group_misc, 0, wxEXPAND | wxALL, 5);