diff options
author | bunnei <bunneidev@gmail.com> | 2020-05-11 23:50:07 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2020-05-11 23:50:07 +0200 |
commit | 988e42a3f57e427e4f91172086ccc8a9a52f73eb (patch) | |
tree | 66ba9ab9aeff5cb1863e0cb731ee4edcf4a2cbc9 /src/core | |
parent | Merge pull request #3925 from ogniK5377/hid-SendKeyboardLockKeyEvent (diff) | |
download | yuzu-988e42a3f57e427e4f91172086ccc8a9a52f73eb.tar yuzu-988e42a3f57e427e4f91172086ccc8a9a52f73eb.tar.gz yuzu-988e42a3f57e427e4f91172086ccc8a9a52f73eb.tar.bz2 yuzu-988e42a3f57e427e4f91172086ccc8a9a52f73eb.tar.lz yuzu-988e42a3f57e427e4f91172086ccc8a9a52f73eb.tar.xz yuzu-988e42a3f57e427e4f91172086ccc8a9a52f73eb.tar.zst yuzu-988e42a3f57e427e4f91172086ccc8a9a52f73eb.zip |
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/settings.cpp | 16 | ||||
-rw-r--r-- | src/core/settings.h | 4 |
2 files changed, 20 insertions, 0 deletions
diff --git a/src/core/settings.cpp b/src/core/settings.cpp index 2b0bdc4d3..da53cde05 100644 --- a/src/core/settings.cpp +++ b/src/core/settings.cpp @@ -63,6 +63,21 @@ const std::array<const char*, NumMouseButtons> mapping = {{ Values values = {}; +std::string GetTimeZoneString() { + static constexpr std::array<const char*, 46> timezones{{ + "auto", "default", "CET", "CST6CDT", "Cuba", "EET", "Egypt", "Eire", + "EST", "EST5EDT", "GB", "GB-Eire", "GMT", "GMT+0", "GMT-0", "GMT0", + "Greenwich", "Hongkong", "HST", "Iceland", "Iran", "Israel", "Jamaica", "Japan", + "Kwajalein", "Libya", "MET", "MST", "MST7MDT", "Navajo", "NZ", "NZ-CHAT", + "Poland", "Portugal", "PRC", "PST8PDT", "ROC", "ROK", "Singapore", "Turkey", + "UCT", "Universal", "UTC", "W-SU", "WET", "Zulu", + }}; + + ASSERT(Settings::values.time_zone_index < timezones.size()); + + return timezones[Settings::values.time_zone_index]; +} + void Apply() { GDBStub::SetServerPort(values.gdbstub_port); GDBStub::ToggleServer(values.use_gdbstub); @@ -87,6 +102,7 @@ void LogSettings() { LogSetting("System_CurrentUser", Settings::values.current_user); LogSetting("System_LanguageIndex", Settings::values.language_index); LogSetting("System_RegionIndex", Settings::values.region_index); + LogSetting("System_TimeZoneIndex", Settings::values.time_zone_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 163900f0b..c1266b341 100644 --- a/src/core/settings.h +++ b/src/core/settings.h @@ -394,6 +394,7 @@ struct Values { s32 current_user; s32 language_index; s32 region_index; + s32 time_zone_index; s32 sound_index; // Controls @@ -490,6 +491,9 @@ struct Values { bool IsGPULevelExtreme(); bool IsGPULevelHigh(); +std::string GetTimeZoneString(); + void Apply(); void LogSettings(); + } // namespace Settings |