diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/set/set.cpp | 10 | ||||
| -rw-r--r-- | src/core/hle/service/set/set.h | 1 | ||||
| -rw-r--r-- | src/core/settings.cpp | 1 | ||||
| -rw-r--r-- | src/core/settings.h | 1 | ||||
| -rw-r--r-- | src/yuzu/configuration/config.cpp | 3 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_system.cpp | 2 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_system.h | 1 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_system.ui | 62 |
8 files changed, 72 insertions, 9 deletions
diff --git a/src/core/hle/service/set/set.cpp b/src/core/hle/service/set/set.cpp index 5bcc0b588..9e12c76fc 100644 --- a/src/core/hle/service/set/set.cpp +++ b/src/core/hle/service/set/set.cpp | |||
| @@ -111,6 +111,14 @@ void SET::GetLanguageCode(Kernel::HLERequestContext& ctx) { | |||
| 111 | rb.PushEnum(available_language_codes[Settings::values.language_index]); | 111 | rb.PushEnum(available_language_codes[Settings::values.language_index]); |
| 112 | } | 112 | } |
| 113 | 113 | ||
| 114 | void SET::GetRegionCode(Kernel::HLERequestContext& ctx) { | ||
| 115 | LOG_DEBUG(Service_SET, "called"); | ||
| 116 | |||
| 117 | IPC::ResponseBuilder rb{ctx, 3}; | ||
| 118 | rb.Push(RESULT_SUCCESS); | ||
| 119 | rb.Push(Settings::values.region_index); | ||
| 120 | } | ||
| 121 | |||
| 114 | SET::SET() : ServiceFramework("set") { | 122 | SET::SET() : ServiceFramework("set") { |
| 115 | // clang-format off | 123 | // clang-format off |
| 116 | static const FunctionInfo functions[] = { | 124 | static const FunctionInfo functions[] = { |
| @@ -118,7 +126,7 @@ SET::SET() : ServiceFramework("set") { | |||
| 118 | {1, &SET::GetAvailableLanguageCodes, "GetAvailableLanguageCodes"}, | 126 | {1, &SET::GetAvailableLanguageCodes, "GetAvailableLanguageCodes"}, |
| 119 | {2, &SET::MakeLanguageCode, "MakeLanguageCode"}, | 127 | {2, &SET::MakeLanguageCode, "MakeLanguageCode"}, |
| 120 | {3, &SET::GetAvailableLanguageCodeCount, "GetAvailableLanguageCodeCount"}, | 128 | {3, &SET::GetAvailableLanguageCodeCount, "GetAvailableLanguageCodeCount"}, |
| 121 | {4, nullptr, "GetRegionCode"}, | 129 | {4, &SET::GetRegionCode, "GetRegionCode"}, |
| 122 | {5, &SET::GetAvailableLanguageCodes2, "GetAvailableLanguageCodes2"}, | 130 | {5, &SET::GetAvailableLanguageCodes2, "GetAvailableLanguageCodes2"}, |
| 123 | {6, &SET::GetAvailableLanguageCodeCount2, "GetAvailableLanguageCodeCount2"}, | 131 | {6, &SET::GetAvailableLanguageCodeCount2, "GetAvailableLanguageCodeCount2"}, |
| 124 | {7, nullptr, "GetKeyCodeMap"}, | 132 | {7, nullptr, "GetKeyCodeMap"}, |
diff --git a/src/core/hle/service/set/set.h b/src/core/hle/service/set/set.h index b154e08aa..6084b345d 100644 --- a/src/core/hle/service/set/set.h +++ b/src/core/hle/service/set/set.h | |||
| @@ -43,6 +43,7 @@ private: | |||
| 43 | void GetAvailableLanguageCodeCount(Kernel::HLERequestContext& ctx); | 43 | void GetAvailableLanguageCodeCount(Kernel::HLERequestContext& ctx); |
| 44 | void GetAvailableLanguageCodeCount2(Kernel::HLERequestContext& ctx); | 44 | void GetAvailableLanguageCodeCount2(Kernel::HLERequestContext& ctx); |
| 45 | void GetQuestFlag(Kernel::HLERequestContext& ctx); | 45 | void GetQuestFlag(Kernel::HLERequestContext& ctx); |
| 46 | void GetRegionCode(Kernel::HLERequestContext& ctx); | ||
| 46 | }; | 47 | }; |
| 47 | 48 | ||
| 48 | } // namespace Service::Set | 49 | } // namespace Service::Set |
diff --git a/src/core/settings.cpp b/src/core/settings.cpp index 7c0303684..c1282cb80 100644 --- a/src/core/settings.cpp +++ b/src/core/settings.cpp | |||
| @@ -86,6 +86,7 @@ void LogSettings() { | |||
| 86 | LogSetting("System_RngSeed", Settings::values.rng_seed.value_or(0)); | 86 | LogSetting("System_RngSeed", Settings::values.rng_seed.value_or(0)); |
| 87 | LogSetting("System_CurrentUser", Settings::values.current_user); | 87 | LogSetting("System_CurrentUser", Settings::values.current_user); |
| 88 | LogSetting("System_LanguageIndex", Settings::values.language_index); | 88 | LogSetting("System_LanguageIndex", Settings::values.language_index); |
| 89 | LogSetting("System_RegionIndex", Settings::values.region_index); | ||
| 89 | LogSetting("Core_UseMultiCore", Settings::values.use_multi_core); | 90 | LogSetting("Core_UseMultiCore", Settings::values.use_multi_core); |
| 90 | LogSetting("Renderer_UseResolutionFactor", Settings::values.resolution_factor); | 91 | LogSetting("Renderer_UseResolutionFactor", Settings::values.resolution_factor); |
| 91 | LogSetting("Renderer_UseFrameLimit", Settings::values.use_frame_limit); | 92 | LogSetting("Renderer_UseFrameLimit", Settings::values.use_frame_limit); |
diff --git a/src/core/settings.h b/src/core/settings.h index 12e2cc9e7..79ec01731 100644 --- a/src/core/settings.h +++ b/src/core/settings.h | |||
| @@ -387,6 +387,7 @@ struct Values { | |||
| 387 | 387 | ||
| 388 | s32 current_user; | 388 | s32 current_user; |
| 389 | s32 language_index; | 389 | s32 language_index; |
| 390 | s32 region_index; | ||
| 390 | s32 sound_index; | 391 | s32 sound_index; |
| 391 | 392 | ||
| 392 | // Controls | 393 | // Controls |
diff --git a/src/yuzu/configuration/config.cpp b/src/yuzu/configuration/config.cpp index 16e67cc0a..3b9ab38dd 100644 --- a/src/yuzu/configuration/config.cpp +++ b/src/yuzu/configuration/config.cpp | |||
| @@ -682,6 +682,8 @@ void Config::ReadSystemValues() { | |||
| 682 | 682 | ||
| 683 | Settings::values.language_index = ReadSetting(QStringLiteral("language_index"), 1).toInt(); | 683 | Settings::values.language_index = ReadSetting(QStringLiteral("language_index"), 1).toInt(); |
| 684 | 684 | ||
| 685 | Settings::values.region_index = ReadSetting(QStringLiteral("region_index"), 1).toInt(); | ||
| 686 | |||
| 685 | const auto rng_seed_enabled = ReadSetting(QStringLiteral("rng_seed_enabled"), false).toBool(); | 687 | const auto rng_seed_enabled = ReadSetting(QStringLiteral("rng_seed_enabled"), false).toBool(); |
| 686 | if (rng_seed_enabled) { | 688 | if (rng_seed_enabled) { |
| 687 | Settings::values.rng_seed = ReadSetting(QStringLiteral("rng_seed"), 0).toULongLong(); | 689 | Settings::values.rng_seed = ReadSetting(QStringLiteral("rng_seed"), 0).toULongLong(); |
| @@ -1116,6 +1118,7 @@ void Config::SaveSystemValues() { | |||
| 1116 | WriteSetting(QStringLiteral("use_docked_mode"), Settings::values.use_docked_mode, false); | 1118 | WriteSetting(QStringLiteral("use_docked_mode"), Settings::values.use_docked_mode, false); |
| 1117 | WriteSetting(QStringLiteral("current_user"), Settings::values.current_user, 0); | 1119 | WriteSetting(QStringLiteral("current_user"), Settings::values.current_user, 0); |
| 1118 | WriteSetting(QStringLiteral("language_index"), Settings::values.language_index, 1); | 1120 | WriteSetting(QStringLiteral("language_index"), Settings::values.language_index, 1); |
| 1121 | WriteSetting(QStringLiteral("region_index"), Settings::values.region_index, 1); | ||
| 1119 | 1122 | ||
| 1120 | WriteSetting(QStringLiteral("rng_seed_enabled"), Settings::values.rng_seed.has_value(), false); | 1123 | WriteSetting(QStringLiteral("rng_seed_enabled"), Settings::values.rng_seed.has_value(), false); |
| 1121 | WriteSetting(QStringLiteral("rng_seed"), Settings::values.rng_seed.value_or(0), 0); | 1124 | WriteSetting(QStringLiteral("rng_seed"), Settings::values.rng_seed.value_or(0), 0); |
diff --git a/src/yuzu/configuration/configure_system.cpp b/src/yuzu/configuration/configure_system.cpp index f9a5b4fbe..f49cd4c8f 100644 --- a/src/yuzu/configuration/configure_system.cpp +++ b/src/yuzu/configuration/configure_system.cpp | |||
| @@ -56,6 +56,7 @@ void ConfigureSystem::SetConfiguration() { | |||
| 56 | enabled = !Core::System::GetInstance().IsPoweredOn(); | 56 | enabled = !Core::System::GetInstance().IsPoweredOn(); |
| 57 | 57 | ||
| 58 | ui->combo_language->setCurrentIndex(Settings::values.language_index); | 58 | ui->combo_language->setCurrentIndex(Settings::values.language_index); |
| 59 | ui->combo_region->setCurrentIndex(Settings::values.region_index); | ||
| 59 | ui->combo_sound->setCurrentIndex(Settings::values.sound_index); | 60 | ui->combo_sound->setCurrentIndex(Settings::values.sound_index); |
| 60 | 61 | ||
| 61 | ui->rng_seed_checkbox->setChecked(Settings::values.rng_seed.has_value()); | 62 | ui->rng_seed_checkbox->setChecked(Settings::values.rng_seed.has_value()); |
| @@ -82,6 +83,7 @@ void ConfigureSystem::ApplyConfiguration() { | |||
| 82 | } | 83 | } |
| 83 | 84 | ||
| 84 | Settings::values.language_index = ui->combo_language->currentIndex(); | 85 | Settings::values.language_index = ui->combo_language->currentIndex(); |
| 86 | Settings::values.region_index = ui->combo_region->currentIndex(); | ||
| 85 | Settings::values.sound_index = ui->combo_sound->currentIndex(); | 87 | Settings::values.sound_index = ui->combo_sound->currentIndex(); |
| 86 | 88 | ||
| 87 | if (ui->rng_seed_checkbox->isChecked()) { | 89 | if (ui->rng_seed_checkbox->isChecked()) { |
diff --git a/src/yuzu/configuration/configure_system.h b/src/yuzu/configuration/configure_system.h index 1eab3781d..d8fa2d2cc 100644 --- a/src/yuzu/configuration/configure_system.h +++ b/src/yuzu/configuration/configure_system.h | |||
| @@ -36,5 +36,6 @@ private: | |||
| 36 | bool enabled = false; | 36 | bool enabled = false; |
| 37 | 37 | ||
| 38 | int language_index = 0; | 38 | int language_index = 0; |
| 39 | int region_index = 0; | ||
| 39 | int sound_index = 0; | 40 | int sound_index = 0; |
| 40 | }; | 41 | }; |
diff --git a/src/yuzu/configuration/configure_system.ui b/src/yuzu/configuration/configure_system.ui index 65745a2f8..4e2c7e76e 100644 --- a/src/yuzu/configuration/configure_system.ui +++ b/src/yuzu/configuration/configure_system.ui | |||
| @@ -22,14 +22,14 @@ | |||
| 22 | <string>System Settings</string> | 22 | <string>System Settings</string> |
| 23 | </property> | 23 | </property> |
| 24 | <layout class="QGridLayout" name="gridLayout"> | 24 | <layout class="QGridLayout" name="gridLayout"> |
| 25 | <item row="1" column="0"> | 25 | <item row="2" column="0"> |
| 26 | <widget class="QLabel" name="label_sound"> | 26 | <widget class="QLabel" name="label_sound"> |
| 27 | <property name="text"> | 27 | <property name="text"> |
| 28 | <string>Sound output mode</string> | 28 | <string>Sound output mode</string> |
| 29 | </property> | 29 | </property> |
| 30 | </widget> | 30 | </widget> |
| 31 | </item> | 31 | </item> |
| 32 | <item row="2" column="0"> | 32 | <item row="3" column="0"> |
| 33 | <widget class="QLabel" name="label_console_id"> | 33 | <widget class="QLabel" name="label_console_id"> |
| 34 | <property name="text"> | 34 | <property name="text"> |
| 35 | <string>Console ID:</string> | 35 | <string>Console ID:</string> |
| @@ -128,14 +128,60 @@ | |||
| 128 | </item> | 128 | </item> |
| 129 | </widget> | 129 | </widget> |
| 130 | </item> | 130 | </item> |
| 131 | <item row="4" column="0"> | 131 | <item row="1" column="0"> |
| 132 | <widget class="QLabel" name="label_region"> | ||
| 133 | <property name="text"> | ||
| 134 | <string>Region:</string> | ||
| 135 | </property> | ||
| 136 | </widget> | ||
| 137 | </item> | ||
| 138 | <item row="1" column="1"> | ||
| 139 | <widget class="QComboBox" name="combo_region"> | ||
| 140 | <item> | ||
| 141 | <property name="text"> | ||
| 142 | <string>Japan</string> | ||
| 143 | </property> | ||
| 144 | </item> | ||
| 145 | <item> | ||
| 146 | <property name="text"> | ||
| 147 | <string>USA</string> | ||
| 148 | </property> | ||
| 149 | </item> | ||
| 150 | <item> | ||
| 151 | <property name="text"> | ||
| 152 | <string>Europe</string> | ||
| 153 | </property> | ||
| 154 | </item> | ||
| 155 | <item> | ||
| 156 | <property name="text"> | ||
| 157 | <string>Australia</string> | ||
| 158 | </property> | ||
| 159 | </item> | ||
| 160 | <item> | ||
| 161 | <property name="text"> | ||
| 162 | <string>China</string> | ||
| 163 | </property> | ||
| 164 | </item> | ||
| 165 | <item> | ||
| 166 | <property name="text"> | ||
| 167 | <string>Korea</string> | ||
| 168 | </property> | ||
| 169 | </item> | ||
| 170 | <item> | ||
| 171 | <property name="text"> | ||
| 172 | <string>Taiwan</string> | ||
| 173 | </property> | ||
| 174 | </item> | ||
| 175 | </widget> | ||
| 176 | </item> | ||
| 177 | <item row="5" column="0"> | ||
| 132 | <widget class="QCheckBox" name="rng_seed_checkbox"> | 178 | <widget class="QCheckBox" name="rng_seed_checkbox"> |
| 133 | <property name="text"> | 179 | <property name="text"> |
| 134 | <string>RNG Seed</string> | 180 | <string>RNG Seed</string> |
| 135 | </property> | 181 | </property> |
| 136 | </widget> | 182 | </widget> |
| 137 | </item> | 183 | </item> |
| 138 | <item row="1" column="1"> | 184 | <item row="2" column="1"> |
| 139 | <widget class="QComboBox" name="combo_sound"> | 185 | <widget class="QComboBox" name="combo_sound"> |
| 140 | <item> | 186 | <item> |
| 141 | <property name="text"> | 187 | <property name="text"> |
| @@ -161,7 +207,7 @@ | |||
| 161 | </property> | 207 | </property> |
| 162 | </widget> | 208 | </widget> |
| 163 | </item> | 209 | </item> |
| 164 | <item row="2" column="1"> | 210 | <item row="3" column="1"> |
| 165 | <widget class="QPushButton" name="button_regenerate_console_id"> | 211 | <widget class="QPushButton" name="button_regenerate_console_id"> |
| 166 | <property name="sizePolicy"> | 212 | <property name="sizePolicy"> |
| 167 | <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> | 213 | <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> |
| @@ -177,14 +223,14 @@ | |||
| 177 | </property> | 223 | </property> |
| 178 | </widget> | 224 | </widget> |
| 179 | </item> | 225 | </item> |
| 180 | <item row="3" column="0"> | 226 | <item row="4" column="0"> |
| 181 | <widget class="QCheckBox" name="custom_rtc_checkbox"> | 227 | <widget class="QCheckBox" name="custom_rtc_checkbox"> |
| 182 | <property name="text"> | 228 | <property name="text"> |
| 183 | <string>Custom RTC</string> | 229 | <string>Custom RTC</string> |
| 184 | </property> | 230 | </property> |
| 185 | </widget> | 231 | </widget> |
| 186 | </item> | 232 | </item> |
| 187 | <item row="3" column="1"> | 233 | <item row="4" column="1"> |
| 188 | <widget class="QDateTimeEdit" name="custom_rtc_edit"> | 234 | <widget class="QDateTimeEdit" name="custom_rtc_edit"> |
| 189 | <property name="minimumDate"> | 235 | <property name="minimumDate"> |
| 190 | <date> | 236 | <date> |
| @@ -198,7 +244,7 @@ | |||
| 198 | </property> | 244 | </property> |
| 199 | </widget> | 245 | </widget> |
| 200 | </item> | 246 | </item> |
| 201 | <item row="4" column="1"> | 247 | <item row="5" column="1"> |
| 202 | <widget class="QLineEdit" name="rng_seed_edit"> | 248 | <widget class="QLineEdit" name="rng_seed_edit"> |
| 203 | <property name="sizePolicy"> | 249 | <property name="sizePolicy"> |
| 204 | <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> | 250 | <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> |