From 39f421d45ddf9ba77ad8e6a3ee676bcd31157a52 Mon Sep 17 00:00:00 2001 From: Jules Blok Date: Tue, 7 Oct 2014 16:46:10 +0200 Subject: [PATCH] Support the borderless fullscreen option in all backends. --- Source/Core/DolphinWX/Frame.cpp | 2 +- Source/Core/DolphinWX/VideoConfigDiag.cpp | 3 +-- Source/Core/DolphinWX/VideoConfigDiag.h | 4 ---- Source/Core/VideoCommon/VideoConfig.cpp | 1 - 4 files changed, 2 insertions(+), 8 deletions(-) diff --git a/Source/Core/DolphinWX/Frame.cpp b/Source/Core/DolphinWX/Frame.cpp index c33ebf5e3c..b101357d02 100644 --- a/Source/Core/DolphinWX/Frame.cpp +++ b/Source/Core/DolphinWX/Frame.cpp @@ -187,7 +187,7 @@ WXLRESULT CRenderFrame::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lPa bool CRenderFrame::ShowFullScreen(bool show, long style) { - if (show) + if (show && !g_Config.bBorderlessFullscreen) { // OpenGL requires the pop-up style to activate exclusive mode. SetWindowStyle((GetWindowStyle() & ~wxDEFAULT_FRAME_STYLE) | wxPOPUP_WINDOW); diff --git a/Source/Core/DolphinWX/VideoConfigDiag.cpp b/Source/Core/DolphinWX/VideoConfigDiag.cpp index b9cf58baef..a12771ae0b 100644 --- a/Source/Core/DolphinWX/VideoConfigDiag.cpp +++ b/Source/Core/DolphinWX/VideoConfigDiag.cpp @@ -119,7 +119,7 @@ static wxString scaled_efb_copy_desc = wxTRANSLATE("Greatly increases quality of static wxString pixel_lighting_desc = wxTRANSLATE("Calculate lighting of 3D graphics per-pixel rather than per vertex.\nDecreases emulation speed by some percent (depending on your GPU).\nThis usually is a safe enhancement, but might cause issues sometimes.\n\nIf unsure, leave this unchecked."); static wxString fast_depth_calc_desc = wxTRANSLATE("Use a less accurate algorithm to calculate depth values.\nCauses issues in a few games but might give a decent speedup.\n\nIf unsure, leave this checked."); static wxString force_filtering_desc = wxTRANSLATE("Force texture filtering even if the emulated game explicitly disabled it.\nImproves texture quality slightly but causes glitches in some games.\n\nIf unsure, leave this unchecked."); -static wxString borderless_fullscreen_desc = wxTRANSLATE("Implement fullscreen mode with a borderless window spanning the whole screen instead of using exclusive mode.\nAllows for faster transitions between fullscreen and windowed mode, but increases input latency, makes movement less smooth and slightly decreases performance.\nExclusive mode is required to support Nvidia 3D Vision.\n\nIf unsure, leave this unchecked."); +static wxString borderless_fullscreen_desc = wxTRANSLATE("Implement fullscreen mode with a borderless window spanning the whole screen instead of using exclusive mode.\nAllows for faster transitions between fullscreen and windowed mode, but increases input latency, makes movement less smooth and slightly decreases performance.\nExclusive mode is required to support Nvidia 3D Vision in the Direct3D backend.\n\nIf unsure, leave this unchecked."); static wxString internal_res_desc = wxTRANSLATE("Specifies the resolution used to render at. A high resolution will improve visual quality a lot but is also quite heavy on performance and might cause glitches in certain games.\n\"Multiple of 640x528\" is a bit slower than \"Window Size\" but yields less issues. Generally speaking, the lower the internal resolution is, the better your performance will be.\n\nIf unsure, select 640x528."); static wxString efb_access_desc = wxTRANSLATE("Ignore any requests of the CPU to read from or write to the EFB.\nImproves performance in some games, but might disable some gameplay-related features or graphical effects.\n\nIf unsure, leave this unchecked."); static wxString efb_emulate_format_changes_desc = wxTRANSLATE("Ignore any changes to the EFB format.\nImproves performance in many games without any negative effect. Causes graphical defects in a small number of other games though.\n\nIf unsure, leave this checked."); @@ -590,7 +590,6 @@ VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string &title, con // Borderless Fullscreen borderless_fullscreen = CreateCheckBox(page_advanced, _("Borderless Fullscreen"), wxGetTranslation(borderless_fullscreen_desc), vconfig.bBorderlessFullscreen); - borderless_fullscreen->Show(vconfig.backend_info.bSupportsExclusiveFullscreen); szr_misc->Add(borderless_fullscreen); wxStaticBoxSizer* const group_misc = new wxStaticBoxSizer(wxVERTICAL, page_advanced, _("Misc")); diff --git a/Source/Core/DolphinWX/VideoConfigDiag.h b/Source/Core/DolphinWX/VideoConfigDiag.h index b20679c5f5..bd242d3a99 100644 --- a/Source/Core/DolphinWX/VideoConfigDiag.h +++ b/Source/Core/DolphinWX/VideoConfigDiag.h @@ -175,10 +175,6 @@ protected: choice_aamode->Enable(vconfig.backend_info.AAModes.size() > 1); text_aamode->Enable(vconfig.backend_info.AAModes.size() > 1); - // Borderless Fullscreen - borderless_fullscreen->Enable(vconfig.backend_info.bSupportsExclusiveFullscreen); - borderless_fullscreen->Show(vconfig.backend_info.bSupportsExclusiveFullscreen); - // EFB copy efbcopy_texture->Enable(vconfig.bEFBCopyEnable); efbcopy_ram->Enable(vconfig.bEFBCopyEnable); diff --git a/Source/Core/VideoCommon/VideoConfig.cpp b/Source/Core/VideoCommon/VideoConfig.cpp index ec7b0f9862..1c9c94b283 100644 --- a/Source/Core/VideoCommon/VideoConfig.cpp +++ b/Source/Core/VideoCommon/VideoConfig.cpp @@ -208,7 +208,6 @@ void VideoConfig::VerifyValidity() // TODO: Check iMaxAnisotropy value if (iAdapter < 0 || iAdapter > ((int)backend_info.Adapters.size() - 1)) iAdapter = 0; if (iMultisampleMode < 0 || iMultisampleMode >= (int)backend_info.AAModes.size()) iMultisampleMode = 0; - if (!backend_info.bSupportsExclusiveFullscreen) bBorderlessFullscreen = false; } void VideoConfig::Save(const std::string& ini_file)