summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinNoGUI
diff options
context:
space:
mode:
authoriwubcode <iwubcode@users.noreply.github.com>2019-03-02 22:41:50 -0600
committeriwubcode <iwubcode@users.noreply.github.com>2019-03-30 18:43:02 -0500
commit840afc2ad4ee9ec633e0735e2f9ccd45f4b0f2d5 (patch)
tree7834c401660a788f073858372381ac3972c4c67b /Source/Core/DolphinNoGUI
parent735a705e4dd9f535dc529e0a7eb0d96ba5982be9 (diff)
Config: Move the 'Display' settings from ConfigManager to the layered config system
Diffstat (limited to 'Source/Core/DolphinNoGUI')
-rw-r--r--Source/Core/DolphinNoGUI/PlatformX11.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/Source/Core/DolphinNoGUI/PlatformX11.cpp b/Source/Core/DolphinNoGUI/PlatformX11.cpp
index 31a8a2e28d..d295c91d66 100644
--- a/Source/Core/DolphinNoGUI/PlatformX11.cpp
+++ b/Source/Core/DolphinNoGUI/PlatformX11.cpp
@@ -7,6 +7,7 @@
#include "DolphinNoGUI/Platform.h"
#include "Common/MsgHandler.h"
+#include "Core/Config/MainSettings.h"
#include "Core/ConfigManager.h"
#include "Core/Core.h"
#include "Core/State.h"
@@ -48,6 +49,10 @@ private:
#if defined(HAVE_XRANDR) && HAVE_XRANDR
X11Utils::XRRConfiguration* m_xrr_config = nullptr;
#endif
+ int m_window_x = Config::Get(Config::MAIN_RENDER_WINDOW_XPOS);
+ int m_window_y = Config::Get(Config::MAIN_RENDER_WINDOW_YPOS);
+ unsigned int m_window_width = Config::Get(Config::MAIN_RENDER_WINDOW_WIDTH);
+ unsigned int m_window_height = Config::Get(Config::MAIN_RENDER_WINDOW_HEIGHT);
};
PlatformX11::~PlatformX11()
@@ -75,10 +80,8 @@ bool PlatformX11::Init()
return false;
}
- m_window = XCreateSimpleWindow(
- m_display, DefaultRootWindow(m_display), SConfig::GetInstance().iRenderWindowXPos,
- SConfig::GetInstance().iRenderWindowYPos, SConfig::GetInstance().iRenderWindowWidth,
- SConfig::GetInstance().iRenderWindowHeight, 0, 0, BlackPixel(m_display, 0));
+ m_window = XCreateSimpleWindow(m_display, DefaultRootWindow(m_display), m_window_x, m_window_y,
+ m_window_width, m_window_height, 0, 0, BlackPixel(m_display, 0));
XSelectInput(m_display, m_window, StructureNotifyMask | KeyPressMask | FocusChangeMask);
Atom wmProtocols[1];
wmProtocols[0] = XInternAtom(m_display, "WM_DELETE_WINDOW", True);
@@ -98,7 +101,7 @@ bool PlatformX11::Init()
XSync(m_display, True);
ProcessEvents();
- if (SConfig::GetInstance().bDisableScreenSaver)
+ if (Config::Get(Config::MAIN_DISABLE_SCREENSAVER))
X11Utils::InhibitScreensaver(m_window, true);
#if defined(HAVE_XRANDR) && HAVE_XRANDR
@@ -118,7 +121,7 @@ bool PlatformX11::Init()
}
// Enter fullscreen if enabled.
- if (SConfig::GetInstance().bFullscreen)
+ if (Config::Get(Config::MAIN_FULLSCREEN))
{
m_window_fullscreen = X11Utils::ToggleFullscreen(m_display, m_window);
#if defined(HAVE_XRANDR) && HAVE_XRANDR
@@ -166,11 +169,8 @@ void PlatformX11::UpdateWindowPosition()
Window winDummy;
unsigned int borderDummy, depthDummy;
- XGetGeometry(m_display, m_window, &winDummy, &SConfig::GetInstance().iRenderWindowXPos,
- &SConfig::GetInstance().iRenderWindowYPos,
- reinterpret_cast<unsigned int*>(&SConfig::GetInstance().iRenderWindowWidth),
- reinterpret_cast<unsigned int*>(&SConfig::GetInstance().iRenderWindowHeight),
- &borderDummy, &depthDummy);
+ XGetGeometry(m_display, m_window, &winDummy, &m_window_x, &m_window_y, &m_window_width,
+ &m_window_height, &borderDummy, &depthDummy);
}
void PlatformX11::ProcessEvents()