summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorJules Blok <jules.blok@gmail.com>2014-07-28 23:26:40 +0200
committerJules Blok <jules.blok@gmail.com>2014-07-30 12:15:58 +0200
commit3b5625c76bef2586af6fbdc98f3ec3ada99db696 (patch)
tree9b492b798003f06cfec3a63fc1e0b5226fca5c97 /Source/Core
parent5bbd34637b5717914af6c6e8f84c6532ac5241e4 (diff)
VideoConfig: Ignore Borderless Fullscreen setting when the backend does not support exclusive fullscreen.
This was expected to be handled by VerifyValidity(), but that only verifies the validity of the INI files.
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/DolphinWX/Frame.cpp6
-rw-r--r--Source/Core/DolphinWX/FrameTools.cpp2
-rw-r--r--Source/Core/VideoCommon/VideoConfig.cpp2
-rw-r--r--Source/Core/VideoCommon/VideoConfig.h1
4 files changed, 6 insertions, 5 deletions
diff --git a/Source/Core/DolphinWX/Frame.cpp b/Source/Core/DolphinWX/Frame.cpp
index 1659367488..057d20172a 100644
--- a/Source/Core/DolphinWX/Frame.cpp
+++ b/Source/Core/DolphinWX/Frame.cpp
@@ -1189,7 +1189,7 @@ void CFrame::OnMouse(wxMouseEvent& event)
void CFrame::DoFullscreen(bool enable_fullscreen)
{
- if (!g_Config.bBorderlessFullscreen &&
+ if (!g_Config.BorderlessFullscreenEnabled() &&
!SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain &&
Core::GetState() == Core::CORE_PAUSE)
{
@@ -1216,7 +1216,7 @@ void CFrame::DoFullscreen(bool enable_fullscreen)
{
m_RenderFrame->ShowFullScreen(true, wxFULLSCREEN_ALL);
}
- else if (g_Config.bBorderlessFullscreen ||
+ else if (g_Config.BorderlessFullscreenEnabled() ||
SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain)
{
// Exiting exclusive fullscreen should be done from a Renderer callback.
@@ -1244,7 +1244,7 @@ void CFrame::DoFullscreen(bool enable_fullscreen)
m_RenderFrame->Raise();
}
- g_Config.bFullscreen = (g_Config.bBorderlessFullscreen ||
+ g_Config.bFullscreen = (g_Config.BorderlessFullscreenEnabled() ||
SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain) ? false : enable_fullscreen;
}
diff --git a/Source/Core/DolphinWX/FrameTools.cpp b/Source/Core/DolphinWX/FrameTools.cpp
index 7da062645f..8ef5fd19f4 100644
--- a/Source/Core/DolphinWX/FrameTools.cpp
+++ b/Source/Core/DolphinWX/FrameTools.cpp
@@ -1104,7 +1104,7 @@ void CFrame::DoStop()
// If exclusive fullscreen is not enabled then we can pause the emulation
// before we've exited fullscreen. If not then we need to exit fullscreen first.
- if (!RendererIsFullscreen() || g_Config.bBorderlessFullscreen ||
+ if (!RendererIsFullscreen() || g_Config.BorderlessFullscreenEnabled() ||
SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain)
{
Core::SetState(Core::CORE_PAUSE);
diff --git a/Source/Core/VideoCommon/VideoConfig.cpp b/Source/Core/VideoCommon/VideoConfig.cpp
index cf7685ada6..d6e2177b6b 100644
--- a/Source/Core/VideoCommon/VideoConfig.cpp
+++ b/Source/Core/VideoCommon/VideoConfig.cpp
@@ -209,7 +209,7 @@ 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 = true;
+ if (!backend_info.bSupportsExclusiveFullscreen) bBorderlessFullscreen = false;
}
void VideoConfig::Save(const std::string& ini_file)
diff --git a/Source/Core/VideoCommon/VideoConfig.h b/Source/Core/VideoCommon/VideoConfig.h
index bf329d658c..ea63a61763 100644
--- a/Source/Core/VideoCommon/VideoConfig.h
+++ b/Source/Core/VideoCommon/VideoConfig.h
@@ -152,6 +152,7 @@ struct VideoConfig final
bool VirtualXFBEnabled() const { return bUseXFB && !bUseRealXFB; }
bool EFBCopiesToTextureEnabled() const { return bEFBCopyEnable && bCopyEFBToTexture; }
bool EFBCopiesToRamEnabled() const { return bEFBCopyEnable && !bCopyEFBToTexture; }
+ bool BorderlessFullscreenEnabled() const { return !backend_info.bSupportsExclusiveFullscreen || bBorderlessFullscreen; }
};
extern VideoConfig g_Config;