diff options
author | bunnei <bunneidev@gmail.com> | 2020-03-22 03:49:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-22 03:49:28 +0100 |
commit | e5bb5d13c4227e8a448975f2920950cd32ba79ea (patch) | |
tree | c9f2c3254b810f56be05090a23a09cc8e304b9f8 /src/core | |
parent | Merge pull request #3525 from FearlessTobi/linux-compile-error (diff) | |
parent | set: implement GetRegionCode (diff) | |
download | yuzu-e5bb5d13c4227e8a448975f2920950cd32ba79ea.tar yuzu-e5bb5d13c4227e8a448975f2920950cd32ba79ea.tar.gz yuzu-e5bb5d13c4227e8a448975f2920950cd32ba79ea.tar.bz2 yuzu-e5bb5d13c4227e8a448975f2920950cd32ba79ea.tar.lz yuzu-e5bb5d13c4227e8a448975f2920950cd32ba79ea.tar.xz yuzu-e5bb5d13c4227e8a448975f2920950cd32ba79ea.tar.zst yuzu-e5bb5d13c4227e8a448975f2920950cd32ba79ea.zip |
Diffstat (limited to 'src/core')
-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 |
4 files changed, 12 insertions, 1 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) { rb.PushEnum(available_language_codes[Settings::values.language_index]); } +void SET::GetRegionCode(Kernel::HLERequestContext& ctx) { + LOG_DEBUG(Service_SET, "called"); + + IPC::ResponseBuilder rb{ctx, 3}; + rb.Push(RESULT_SUCCESS); + rb.Push(Settings::values.region_index); +} + SET::SET() : ServiceFramework("set") { // clang-format off static const FunctionInfo functions[] = { @@ -118,7 +126,7 @@ SET::SET() : ServiceFramework("set") { {1, &SET::GetAvailableLanguageCodes, "GetAvailableLanguageCodes"}, {2, &SET::MakeLanguageCode, "MakeLanguageCode"}, {3, &SET::GetAvailableLanguageCodeCount, "GetAvailableLanguageCodeCount"}, - {4, nullptr, "GetRegionCode"}, + {4, &SET::GetRegionCode, "GetRegionCode"}, {5, &SET::GetAvailableLanguageCodes2, "GetAvailableLanguageCodes2"}, {6, &SET::GetAvailableLanguageCodeCount2, "GetAvailableLanguageCodeCount2"}, {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: void GetAvailableLanguageCodeCount(Kernel::HLERequestContext& ctx); void GetAvailableLanguageCodeCount2(Kernel::HLERequestContext& ctx); void GetQuestFlag(Kernel::HLERequestContext& ctx); + void GetRegionCode(Kernel::HLERequestContext& ctx); }; } // 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() { LogSetting("System_RngSeed", Settings::values.rng_seed.value_or(0)); LogSetting("System_CurrentUser", Settings::values.current_user); LogSetting("System_LanguageIndex", Settings::values.language_index); + LogSetting("System_RegionIndex", Settings::values.region_index); LogSetting("Core_UseMultiCore", Settings::values.use_multi_core); LogSetting("Renderer_UseResolutionFactor", Settings::values.resolution_factor); 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 { s32 current_user; s32 language_index; + s32 region_index; s32 sound_index; // Controls |