diff options
Diffstat (limited to 'src/yuzu/configuration/configuration_shared.h')
-rw-r--r-- | src/yuzu/configuration/configuration_shared.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/yuzu/configuration/configuration_shared.h b/src/yuzu/configuration/configuration_shared.h index 77802a367..e597dcdb5 100644 --- a/src/yuzu/configuration/configuration_shared.h +++ b/src/yuzu/configuration/configuration_shared.h @@ -1,6 +1,5 @@ -// Copyright 2016 Citra Emulator Project -// Licensed under GPLv2 or any later version -// Refer to the license.txt file included. +// SPDX-FileCopyrightText: 2016 Citra Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -27,8 +26,9 @@ enum class CheckState { // ApplyPerGameSetting, given a Settings::Setting and a Qt UI element, properly applies a Setting void ApplyPerGameSetting(Settings::SwitchableSetting<bool>* setting, const QCheckBox* checkbox, const CheckState& tracker); -template <typename Type> -void ApplyPerGameSetting(Settings::SwitchableSetting<Type>* setting, const QComboBox* combobox) { +template <typename Type, bool ranged> +void ApplyPerGameSetting(Settings::SwitchableSetting<Type, ranged>* setting, + const QComboBox* combobox) { if (Settings::IsConfiguringGlobal() && setting->UsingGlobal()) { setting->SetValue(static_cast<Type>(combobox->currentIndex())); } else if (!Settings::IsConfiguringGlobal()) { @@ -45,8 +45,9 @@ void ApplyPerGameSetting(Settings::SwitchableSetting<Type>* setting, const QComb // Sets a Qt UI element given a Settings::Setting void SetPerGameSetting(QCheckBox* checkbox, const Settings::SwitchableSetting<bool>* setting); -template <typename Type> -void SetPerGameSetting(QComboBox* combobox, const Settings::SwitchableSetting<Type>* setting) { +template <typename Type, bool ranged> +void SetPerGameSetting(QComboBox* combobox, + const Settings::SwitchableSetting<Type, ranged>* setting) { combobox->setCurrentIndex(setting->UsingGlobal() ? ConfigurationShared::USE_GLOBAL_INDEX : static_cast<int>(setting->GetValue()) + ConfigurationShared::USE_GLOBAL_OFFSET); |