DolphinQt: Expose "DisableScreenSaver" setting in the UI.
This commit is contained in:
parent
50384cfab7
commit
fa83a3a114
|
@ -148,12 +148,14 @@ void InterfacePane::CreateUI()
|
||||||
new QCheckBox(tr("Download Game Covers from GameTDB.com for Use in Grid Mode"));
|
new QCheckBox(tr("Download Game Covers from GameTDB.com for Use in Grid Mode"));
|
||||||
m_checkbox_show_debugging_ui = new QCheckBox(tr("Show Debugging UI"));
|
m_checkbox_show_debugging_ui = new QCheckBox(tr("Show Debugging UI"));
|
||||||
m_checkbox_focused_hotkeys = new QCheckBox(tr("Hotkeys Require Window Focus"));
|
m_checkbox_focused_hotkeys = new QCheckBox(tr("Hotkeys Require Window Focus"));
|
||||||
|
m_checkbox_disable_screensaver = new QCheckBox(tr("Inhibit Screensaver During Emulation"));
|
||||||
|
|
||||||
groupbox_layout->addWidget(m_checkbox_use_builtin_title_database);
|
groupbox_layout->addWidget(m_checkbox_use_builtin_title_database);
|
||||||
groupbox_layout->addWidget(m_checkbox_use_userstyle);
|
groupbox_layout->addWidget(m_checkbox_use_userstyle);
|
||||||
groupbox_layout->addWidget(m_checkbox_use_covers);
|
groupbox_layout->addWidget(m_checkbox_use_covers);
|
||||||
groupbox_layout->addWidget(m_checkbox_show_debugging_ui);
|
groupbox_layout->addWidget(m_checkbox_show_debugging_ui);
|
||||||
groupbox_layout->addWidget(m_checkbox_focused_hotkeys);
|
groupbox_layout->addWidget(m_checkbox_focused_hotkeys);
|
||||||
|
groupbox_layout->addWidget(m_checkbox_disable_screensaver);
|
||||||
}
|
}
|
||||||
|
|
||||||
void InterfacePane::CreateInGame()
|
void InterfacePane::CreateInGame()
|
||||||
|
@ -185,6 +187,7 @@ void InterfacePane::ConnectLayout()
|
||||||
connect(m_checkbox_use_builtin_title_database, &QCheckBox::toggled, this,
|
connect(m_checkbox_use_builtin_title_database, &QCheckBox::toggled, this,
|
||||||
&InterfacePane::OnSaveConfig);
|
&InterfacePane::OnSaveConfig);
|
||||||
connect(m_checkbox_use_covers, &QCheckBox::toggled, this, &InterfacePane::OnSaveConfig);
|
connect(m_checkbox_use_covers, &QCheckBox::toggled, this, &InterfacePane::OnSaveConfig);
|
||||||
|
connect(m_checkbox_disable_screensaver, &QCheckBox::toggled, this, &InterfacePane::OnSaveConfig);
|
||||||
connect(m_checkbox_show_debugging_ui, &QCheckBox::toggled, this, &InterfacePane::OnSaveConfig);
|
connect(m_checkbox_show_debugging_ui, &QCheckBox::toggled, this, &InterfacePane::OnSaveConfig);
|
||||||
connect(m_checkbox_focused_hotkeys, &QCheckBox::toggled, this, &InterfacePane::OnSaveConfig);
|
connect(m_checkbox_focused_hotkeys, &QCheckBox::toggled, this, &InterfacePane::OnSaveConfig);
|
||||||
connect(m_combobox_theme, qOverload<int>(&QComboBox::currentIndexChanged), this,
|
connect(m_combobox_theme, qOverload<int>(&QComboBox::currentIndexChanged), this,
|
||||||
|
@ -237,6 +240,7 @@ void InterfacePane::LoadConfig()
|
||||||
m_checkbox_use_covers->setChecked(Config::Get(Config::MAIN_USE_GAME_COVERS));
|
m_checkbox_use_covers->setChecked(Config::Get(Config::MAIN_USE_GAME_COVERS));
|
||||||
m_checkbox_focused_hotkeys->setChecked(Config::Get(Config::MAIN_FOCUSED_HOTKEYS));
|
m_checkbox_focused_hotkeys->setChecked(Config::Get(Config::MAIN_FOCUSED_HOTKEYS));
|
||||||
m_checkbox_hide_mouse->setChecked(Settings::Instance().GetHideCursor());
|
m_checkbox_hide_mouse->setChecked(Settings::Instance().GetHideCursor());
|
||||||
|
m_checkbox_disable_screensaver->setChecked(Config::Get(Config::MAIN_DISABLE_SCREENSAVER));
|
||||||
}
|
}
|
||||||
|
|
||||||
void InterfacePane::OnSaveConfig()
|
void InterfacePane::OnSaveConfig()
|
||||||
|
@ -280,6 +284,7 @@ void InterfacePane::OnSaveConfig()
|
||||||
}
|
}
|
||||||
|
|
||||||
Config::SetBase(Config::MAIN_FOCUSED_HOTKEYS, m_checkbox_focused_hotkeys->isChecked());
|
Config::SetBase(Config::MAIN_FOCUSED_HOTKEYS, m_checkbox_focused_hotkeys->isChecked());
|
||||||
|
Config::SetBase(Config::MAIN_DISABLE_SCREENSAVER, m_checkbox_disable_screensaver->isChecked());
|
||||||
|
|
||||||
settings.SaveSettings();
|
settings.SaveSettings();
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,6 +37,7 @@ private:
|
||||||
QCheckBox* m_checkbox_show_debugging_ui;
|
QCheckBox* m_checkbox_show_debugging_ui;
|
||||||
QCheckBox* m_checkbox_focused_hotkeys;
|
QCheckBox* m_checkbox_focused_hotkeys;
|
||||||
QCheckBox* m_checkbox_use_covers;
|
QCheckBox* m_checkbox_use_covers;
|
||||||
|
QCheckBox* m_checkbox_disable_screensaver;
|
||||||
|
|
||||||
QCheckBox* m_checkbox_confirm_on_stop;
|
QCheckBox* m_checkbox_confirm_on_stop;
|
||||||
QCheckBox* m_checkbox_use_panic_handlers;
|
QCheckBox* m_checkbox_use_panic_handlers;
|
||||||
|
|
Loading…
Reference in New Issue