summaryrefslogtreecommitdiff
path: root/src/yuzu/configuration/configuration_shared.cpp
diff options
context:
space:
mode:
authorlat9nq <22451773+lat9nq@users.noreply.github.com>2021-05-19 16:00:48 -0400
committerlat9nq <22451773+lat9nq@users.noreply.github.com>2021-05-19 16:00:48 -0400
commit12ef74456c466163345a0d800ba11c5d408993e4 (patch)
tree69512a77b738321ee52766deadd42dd9847af05b /src/yuzu/configuration/configuration_shared.cpp
parent339dc4f806b0c39a4ec6460187f345c4e2890d05 (diff)
configuration_shared: Drop unused function and template another
Drops an unused variant of ApplyPerGameSetting, and turns the QComboBox variants of SetPerGameSetting into a template. Co-authored-by: Ameer J <52414509+ameerj@users.noreply.github.com>
Diffstat (limited to 'src/yuzu/configuration/configuration_shared.cpp')
-rw-r--r--src/yuzu/configuration/configuration_shared.cpp43
1 files changed, 0 insertions, 43 deletions
diff --git a/src/yuzu/configuration/configuration_shared.cpp b/src/yuzu/configuration/configuration_shared.cpp
index 83ec83745..096e42e94 100644
--- a/src/yuzu/configuration/configuration_shared.cpp
+++ b/src/yuzu/configuration/configuration_shared.cpp
@@ -39,21 +39,6 @@ void ConfigurationShared::ApplyPerGameSetting(Settings::Setting<int>* setting,
}
}
-void ConfigurationShared::ApplyPerGameSetting(Settings::Setting<Settings::RendererBackend>* setting,
- const QComboBox* combobox) {
- if (Settings::IsConfiguringGlobal() && setting->UsingGlobal()) {
- setting->SetValue(static_cast<Settings::RendererBackend>(combobox->currentIndex()));
- } else if (!Settings::IsConfiguringGlobal()) {
- if (combobox->currentIndex() == ConfigurationShared::USE_GLOBAL_INDEX) {
- setting->SetGlobal(true);
- } else {
- setting->SetGlobal(false);
- setting->SetValue(static_cast<Settings::RendererBackend>(
- combobox->currentIndex() - ConfigurationShared::USE_GLOBAL_OFFSET));
- }
- }
-}
-
void ConfigurationShared::SetPerGameSetting(QCheckBox* checkbox,
const Settings::Setting<bool>* setting) {
if (setting->UsingGlobal()) {
@@ -63,34 +48,6 @@ void ConfigurationShared::SetPerGameSetting(QCheckBox* checkbox,
}
}
-void ConfigurationShared::SetPerGameSetting(QComboBox* combobox,
- const Settings::Setting<int>* setting) {
- combobox->setCurrentIndex(setting->UsingGlobal()
- ? ConfigurationShared::USE_GLOBAL_INDEX
- : setting->GetValue() + ConfigurationShared::USE_GLOBAL_OFFSET);
-}
-
-void ConfigurationShared::SetPerGameSetting(
- QComboBox* combobox, const Settings::Setting<Settings::RendererBackend>* setting) {
- combobox->setCurrentIndex(setting->UsingGlobal() ? ConfigurationShared::USE_GLOBAL_INDEX
- : static_cast<int>(setting->GetValue()) +
- ConfigurationShared::USE_GLOBAL_OFFSET);
-}
-
-void ConfigurationShared::SetPerGameSetting(
- QComboBox* combobox, const Settings::Setting<Settings::GPUAccuracy>* setting) {
- combobox->setCurrentIndex(setting->UsingGlobal() ? ConfigurationShared::USE_GLOBAL_INDEX
- : static_cast<int>(setting->GetValue()) +
- ConfigurationShared::USE_GLOBAL_OFFSET);
-}
-
-void ConfigurationShared::SetPerGameSetting(
- QComboBox* combobox, const Settings::Setting<Settings::CPUAccuracy>* setting) {
- combobox->setCurrentIndex(setting->UsingGlobal() ? ConfigurationShared::USE_GLOBAL_INDEX
- : static_cast<int>(setting->GetValue()) +
- ConfigurationShared::USE_GLOBAL_OFFSET);
-}
-
void ConfigurationShared::SetHighlight(QWidget* widget, bool highlighted) {
if (highlighted) {
widget->setStyleSheet(QStringLiteral("QWidget#%1 { background-color:rgba(0,203,255,0.5) }")