diff options
author | german77 <juangerman-13@hotmail.com> | 2024-01-27 21:11:37 +0100 |
---|---|---|
committer | german77 <juangerman-13@hotmail.com> | 2024-01-28 16:32:46 +0100 |
commit | 12e7ee2357bc65791e774167780c9955d30f4811 (patch) | |
tree | f33ef726333c4ae7a1c195da9ddce9ebb5ca6323 /src/core/hle/service/set/setting_formats/system_settings.cpp | |
parent | Merge pull request #12818 from K900/small-fixes (diff) | |
download | yuzu-12e7ee2357bc65791e774167780c9955d30f4811.tar yuzu-12e7ee2357bc65791e774167780c9955d30f4811.tar.gz yuzu-12e7ee2357bc65791e774167780c9955d30f4811.tar.bz2 yuzu-12e7ee2357bc65791e774167780c9955d30f4811.tar.lz yuzu-12e7ee2357bc65791e774167780c9955d30f4811.tar.xz yuzu-12e7ee2357bc65791e774167780c9955d30f4811.tar.zst yuzu-12e7ee2357bc65791e774167780c9955d30f4811.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/set/setting_formats/system_settings.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/core/hle/service/set/setting_formats/system_settings.cpp b/src/core/hle/service/set/setting_formats/system_settings.cpp index 88a305f03..16ded43bf 100644 --- a/src/core/hle/service/set/setting_formats/system_settings.cpp +++ b/src/core/hle/service/set/setting_formats/system_settings.cpp @@ -1,6 +1,7 @@ // SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later +#include "common/settings.h" #include "core/hle/service/set/setting_formats/system_settings.h" namespace Service::Set { @@ -52,6 +53,17 @@ SystemSettings DefaultSystemSettings() { settings.chinese_traditional_input_method = ChineseTraditionalInputMethod::Unknown0; settings.vibration_master_volume = 1.0f; + const auto language_code = + available_language_codes[static_cast<s32>(::Settings::values.language_index.GetValue())]; + const auto key_code = + std::find_if(language_to_layout.cbegin(), language_to_layout.cend(), + [=](const auto& element) { return element.first == language_code; }); + + settings.keyboard_layout = KeyboardLayout::EnglishUs; + if (key_code != language_to_layout.end()) { + settings.keyboard_layout = key_code->second; + } + return settings; } |