mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 20:28:56 +00:00
Config: Port remaining Interface settings to new config system.
This commit is contained in:
parent
df0870f79d
commit
d6331c1e71
30 changed files with 135 additions and 162 deletions
|
@ -13,7 +13,6 @@ static constexpr auto X_None = None;
|
|||
|
||||
#include "Common/MsgHandler.h"
|
||||
#include "Core/Config/MainSettings.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/State.h"
|
||||
|
||||
|
@ -70,7 +69,7 @@ PlatformX11::~PlatformX11()
|
|||
|
||||
if (m_display)
|
||||
{
|
||||
if (SConfig::GetInstance().m_show_cursor == SConfig::ShowCursor::Never)
|
||||
if (Config::Get(Config::MAIN_SHOW_CURSOR) == Config::ShowCursor::Never)
|
||||
XFreeCursor(m_display, m_blank_cursor);
|
||||
|
||||
XCloseDisplay(m_display);
|
||||
|
@ -115,7 +114,7 @@ bool PlatformX11::Init()
|
|||
m_xrr_config = new X11Utils::XRRConfiguration(m_display, m_window);
|
||||
#endif
|
||||
|
||||
if (SConfig::GetInstance().m_show_cursor == SConfig::ShowCursor::Never)
|
||||
if (Config::Get(Config::MAIN_SHOW_CURSOR) == Config::ShowCursor::Never)
|
||||
{
|
||||
// make a blank cursor
|
||||
Pixmap Blank;
|
||||
|
@ -200,13 +199,13 @@ void PlatformX11::ProcessEvents()
|
|||
{
|
||||
if (Core::GetState() == Core::State::Running)
|
||||
{
|
||||
if (SConfig::GetInstance().m_show_cursor == SConfig::ShowCursor::Never)
|
||||
if (Config::Get(Config::MAIN_SHOW_CURSOR) == Config::ShowCursor::Never)
|
||||
XUndefineCursor(m_display, m_window);
|
||||
Core::SetState(Core::State::Paused);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (SConfig::GetInstance().m_show_cursor == SConfig::ShowCursor::Never)
|
||||
if (Config::Get(Config::MAIN_SHOW_CURSOR) == Config::ShowCursor::Never)
|
||||
XDefineCursor(m_display, m_window, m_blank_cursor);
|
||||
Core::SetState(Core::State::Running);
|
||||
}
|
||||
|
@ -243,7 +242,7 @@ void PlatformX11::ProcessEvents()
|
|||
case FocusIn:
|
||||
{
|
||||
m_window_focus = true;
|
||||
if (SConfig::GetInstance().m_show_cursor == SConfig::ShowCursor::Never &&
|
||||
if (Config::Get(Config::MAIN_SHOW_CURSOR) == Config::ShowCursor::Never &&
|
||||
Core::GetState() != Core::State::Paused)
|
||||
XDefineCursor(m_display, m_window, m_blank_cursor);
|
||||
}
|
||||
|
@ -251,7 +250,7 @@ void PlatformX11::ProcessEvents()
|
|||
case FocusOut:
|
||||
{
|
||||
m_window_focus = false;
|
||||
if (SConfig::GetInstance().m_show_cursor == SConfig::ShowCursor::Never)
|
||||
if (Config::Get(Config::MAIN_SHOW_CURSOR) == Config::ShowCursor::Never)
|
||||
XUndefineCursor(m_display, m_window);
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue