diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2024-01-28 17:57:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-28 17:57:47 +0100 |
commit | 820f1c8a166f4d3e27da4509f4c45706cdaf288e (patch) | |
tree | e4fb809322e24bf465f2b4da7b975b5c6071319f /src/core/hle/service/set/setting_formats/system_settings.cpp | |
parent | Merge pull request #12802 from german77/mii_interface (diff) | |
parent | service: set: Increase settings version (diff) | |
download | yuzu-820f1c8a166f4d3e27da4509f4c45706cdaf288e.tar yuzu-820f1c8a166f4d3e27da4509f4c45706cdaf288e.tar.gz yuzu-820f1c8a166f4d3e27da4509f4c45706cdaf288e.tar.bz2 yuzu-820f1c8a166f4d3e27da4509f4c45706cdaf288e.tar.lz yuzu-820f1c8a166f4d3e27da4509f4c45706cdaf288e.tar.xz yuzu-820f1c8a166f4d3e27da4509f4c45706cdaf288e.tar.zst yuzu-820f1c8a166f4d3e27da4509f4c45706cdaf288e.zip |
Diffstat (limited to 'src/core/hle/service/set/setting_formats/system_settings.cpp')
-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; } |