diff options
| -rw-r--r-- | .gitmodules | 42 | ||||
| -rw-r--r-- | src/common/settings.cpp | 19 |
2 files changed, 37 insertions, 24 deletions
diff --git a/.gitmodules b/.gitmodules index 5a8169b44..9f96b70be 100644 --- a/.gitmodules +++ b/.gitmodules | |||
| @@ -2,35 +2,35 @@ | |||
| 2 | # SPDX-License-Identifier: GPL-2.0-or-later | 2 | # SPDX-License-Identifier: GPL-2.0-or-later |
| 3 | 3 | ||
| 4 | [submodule "enet"] | 4 | [submodule "enet"] |
| 5 | path = externals/enet | 5 | path = externals/enet |
| 6 | url = https://github.com/lsalzman/enet.git | 6 | url = https://github.com/lsalzman/enet.git |
| 7 | [submodule "inih"] | 7 | [submodule "inih"] |
| 8 | path = externals/inih/inih | 8 | path = externals/inih/inih |
| 9 | url = https://github.com/benhoyt/inih.git | 9 | url = https://github.com/benhoyt/inih.git |
| 10 | [submodule "cubeb"] | 10 | [submodule "cubeb"] |
| 11 | path = externals/cubeb | 11 | path = externals/cubeb |
| 12 | url = https://github.com/mozilla/cubeb.git | 12 | url = https://github.com/mozilla/cubeb.git |
| 13 | [submodule "dynarmic"] | 13 | [submodule "dynarmic"] |
| 14 | path = externals/dynarmic | 14 | path = externals/dynarmic |
| 15 | url = https://github.com/MerryMage/dynarmic.git | 15 | url = https://github.com/merryhime/dynarmic.git |
| 16 | [submodule "libusb"] | 16 | [submodule "libusb"] |
| 17 | path = externals/libusb/libusb | 17 | path = externals/libusb/libusb |
| 18 | url = https://github.com/libusb/libusb.git | 18 | url = https://github.com/libusb/libusb.git |
| 19 | [submodule "discord-rpc"] | 19 | [submodule "discord-rpc"] |
| 20 | path = externals/discord-rpc | 20 | path = externals/discord-rpc |
| 21 | url = https://github.com/yuzu-emu/discord-rpc.git | 21 | url = https://github.com/yuzu-emu/discord-rpc.git |
| 22 | [submodule "Vulkan-Headers"] | 22 | [submodule "Vulkan-Headers"] |
| 23 | path = externals/Vulkan-Headers | 23 | path = externals/Vulkan-Headers |
| 24 | url = https://github.com/KhronosGroup/Vulkan-Headers.git | 24 | url = https://github.com/KhronosGroup/Vulkan-Headers.git |
| 25 | [submodule "sirit"] | 25 | [submodule "sirit"] |
| 26 | path = externals/sirit | 26 | path = externals/sirit |
| 27 | url = https://github.com/yuzu-emu/sirit | 27 | url = https://github.com/yuzu-emu/sirit.git |
| 28 | [submodule "mbedtls"] | 28 | [submodule "mbedtls"] |
| 29 | path = externals/mbedtls | 29 | path = externals/mbedtls |
| 30 | url = https://github.com/yuzu-emu/mbedtls | 30 | url = https://github.com/yuzu-emu/mbedtls.git |
| 31 | [submodule "xbyak"] | 31 | [submodule "xbyak"] |
| 32 | path = externals/xbyak | 32 | path = externals/xbyak |
| 33 | url = https://github.com/herumi/xbyak.git | 33 | url = https://github.com/herumi/xbyak.git |
| 34 | [submodule "opus"] | 34 | [submodule "opus"] |
| 35 | path = externals/opus/opus | 35 | path = externals/opus/opus |
| 36 | url = https://github.com/xiph/opus.git | 36 | url = https://github.com/xiph/opus.git |
| @@ -45,16 +45,16 @@ | |||
| 45 | url = https://github.com/FFmpeg/FFmpeg.git | 45 | url = https://github.com/FFmpeg/FFmpeg.git |
| 46 | [submodule "vcpkg"] | 46 | [submodule "vcpkg"] |
| 47 | path = externals/vcpkg | 47 | path = externals/vcpkg |
| 48 | url = https://github.com/Microsoft/vcpkg.git | 48 | url = https://github.com/microsoft/vcpkg.git |
| 49 | [submodule "cpp-jwt"] | 49 | [submodule "cpp-jwt"] |
| 50 | path = externals/cpp-jwt | 50 | path = externals/cpp-jwt |
| 51 | url = https://github.com/arun11299/cpp-jwt.git | 51 | url = https://github.com/arun11299/cpp-jwt.git |
| 52 | [submodule "libadrenotools"] | 52 | [submodule "libadrenotools"] |
| 53 | path = externals/libadrenotools | 53 | path = externals/libadrenotools |
| 54 | url = https://github.com/bylaws/libadrenotools | 54 | url = https://github.com/bylaws/libadrenotools.git |
| 55 | [submodule "tzdb_to_nx"] | 55 | [submodule "tzdb_to_nx"] |
| 56 | path = externals/nx_tzdb/tzdb_to_nx | 56 | path = externals/nx_tzdb/tzdb_to_nx |
| 57 | url = https://github.com/lat9nq/tzdb_to_nx.git | 57 | url = https://github.com/lat9nq/tzdb_to_nx.git |
| 58 | [submodule "VulkanMemoryAllocator"] | 58 | [submodule "VulkanMemoryAllocator"] |
| 59 | path = externals/vma/VulkanMemoryAllocator | 59 | path = externals/vma/VulkanMemoryAllocator |
| 60 | url = https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator | 60 | url = https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git |
diff --git a/src/common/settings.cpp b/src/common/settings.cpp index 66dffc9bf..6cbbea1b2 100644 --- a/src/common/settings.cpp +++ b/src/common/settings.cpp | |||
| @@ -1,8 +1,11 @@ | |||
| 1 | // SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project | 1 | // SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project |
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | 2 | // SPDX-License-Identifier: GPL-2.0-or-later |
| 3 | 3 | ||
| 4 | #include <version> | ||
| 4 | #if __cpp_lib_chrono >= 201907L | 5 | #if __cpp_lib_chrono >= 201907L |
| 5 | #include <chrono> | 6 | #include <chrono> |
| 7 | #include <exception> | ||
| 8 | #include <stdexcept> | ||
| 6 | #endif | 9 | #endif |
| 7 | #include <string_view> | 10 | #include <string_view> |
| 8 | 11 | ||
| @@ -25,9 +28,19 @@ std::string GetTimeZoneString() { | |||
| 25 | if (time_zone_index == 0) { // Auto | 28 | if (time_zone_index == 0) { // Auto |
| 26 | #if __cpp_lib_chrono >= 201907L | 29 | #if __cpp_lib_chrono >= 201907L |
| 27 | const struct std::chrono::tzdb& time_zone_data = std::chrono::get_tzdb(); | 30 | const struct std::chrono::tzdb& time_zone_data = std::chrono::get_tzdb(); |
| 28 | const std::chrono::time_zone* current_zone = time_zone_data.current_zone(); | 31 | try { |
| 29 | std::string_view current_zone_name = current_zone->name(); | 32 | const std::chrono::time_zone* current_zone = time_zone_data.current_zone(); |
| 30 | location_name = current_zone_name; | 33 | std::string_view current_zone_name = current_zone->name(); |
| 34 | location_name = current_zone_name; | ||
| 35 | } catch (std::runtime_error& runtime_error) { | ||
| 36 | // VCRUNTIME will throw a runtime_error if the operating system's selected time zone | ||
| 37 | // cannot be found | ||
| 38 | location_name = Common::TimeZone::FindSystemTimeZone(); | ||
| 39 | LOG_WARNING(Common, | ||
| 40 | "Error occurred when trying to determine system time zone:\n{}\nFalling " | ||
| 41 | "back to hour offset \"{}\"", | ||
| 42 | runtime_error.what(), location_name); | ||
| 43 | } | ||
| 31 | #else | 44 | #else |
| 32 | location_name = Common::TimeZone::FindSystemTimeZone(); | 45 | location_name = Common::TimeZone::FindSystemTimeZone(); |
| 33 | #endif | 46 | #endif |