early-access version 3637
This commit is contained in:
parent
19ca7d484f
commit
125665beb5
@ -1,7 +1,7 @@
|
|||||||
yuzu emulator early access
|
yuzu emulator early access
|
||||||
=============
|
=============
|
||||||
|
|
||||||
This is the source code for early-access 3636.
|
This is the source code for early-access 3637.
|
||||||
|
|
||||||
## Legal Notice
|
## Legal Notice
|
||||||
|
|
||||||
|
@ -23,8 +23,8 @@ const std::array<const char*, 16> LANGUAGE_NAMES{{
|
|||||||
"Portuguese",
|
"Portuguese",
|
||||||
"Russian",
|
"Russian",
|
||||||
"Korean",
|
"Korean",
|
||||||
"Taiwanese",
|
"TraditionalChinese",
|
||||||
"Chinese",
|
"SimplifiedChinese",
|
||||||
"BrazilianPortuguese",
|
"BrazilianPortuguese",
|
||||||
}};
|
}};
|
||||||
|
|
||||||
@ -45,17 +45,17 @@ constexpr std::array<Language, 18> language_to_codes = {{
|
|||||||
Language::German,
|
Language::German,
|
||||||
Language::Italian,
|
Language::Italian,
|
||||||
Language::Spanish,
|
Language::Spanish,
|
||||||
Language::Chinese,
|
Language::SimplifiedChinese,
|
||||||
Language::Korean,
|
Language::Korean,
|
||||||
Language::Dutch,
|
Language::Dutch,
|
||||||
Language::Portuguese,
|
Language::Portuguese,
|
||||||
Language::Russian,
|
Language::Russian,
|
||||||
Language::Taiwanese,
|
Language::TraditionalChinese,
|
||||||
Language::BritishEnglish,
|
Language::BritishEnglish,
|
||||||
Language::CanadianFrench,
|
Language::CanadianFrench,
|
||||||
Language::LatinAmericanSpanish,
|
Language::LatinAmericanSpanish,
|
||||||
Language::Chinese,
|
Language::SimplifiedChinese,
|
||||||
Language::Taiwanese,
|
Language::TraditionalChinese,
|
||||||
Language::BrazilianPortuguese,
|
Language::BrazilianPortuguese,
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
@ -84,8 +84,8 @@ enum class Language : u8 {
|
|||||||
Portuguese = 10,
|
Portuguese = 10,
|
||||||
Russian = 11,
|
Russian = 11,
|
||||||
Korean = 12,
|
Korean = 12,
|
||||||
Taiwanese = 13,
|
TraditionalChinese = 13,
|
||||||
Chinese = 14,
|
SimplifiedChinese = 14,
|
||||||
BrazilianPortuguese = 15,
|
BrazilianPortuguese = 15,
|
||||||
|
|
||||||
Default = 255,
|
Default = 255,
|
||||||
|
@ -25,6 +25,8 @@
|
|||||||
#include "core/file_sys/vfs_layered.h"
|
#include "core/file_sys/vfs_layered.h"
|
||||||
#include "core/file_sys/vfs_vector.h"
|
#include "core/file_sys/vfs_vector.h"
|
||||||
#include "core/hle/service/filesystem/filesystem.h"
|
#include "core/hle/service/filesystem/filesystem.h"
|
||||||
|
#include "core/hle/service/ns/language.h"
|
||||||
|
#include "core/hle/service/set/set.h"
|
||||||
#include "core/loader/loader.h"
|
#include "core/loader/loader.h"
|
||||||
#include "core/loader/nso.h"
|
#include "core/loader/nso.h"
|
||||||
#include "core/memory/cheat_engine.h"
|
#include "core/memory/cheat_engine.h"
|
||||||
@ -624,8 +626,37 @@ PatchManager::Metadata PatchManager::ParseControlNCA(const NCA& nca) const {
|
|||||||
|
|
||||||
auto nacp = nacp_file == nullptr ? nullptr : std::make_unique<NACP>(nacp_file);
|
auto nacp = nacp_file == nullptr ? nullptr : std::make_unique<NACP>(nacp_file);
|
||||||
|
|
||||||
|
// Get language code from settings
|
||||||
|
const auto language_code =
|
||||||
|
Service::Set::GetLanguageCodeFromIndex(Settings::values.language_index.GetValue());
|
||||||
|
|
||||||
|
// Convert to application language and get priority list
|
||||||
|
const auto application_language =
|
||||||
|
Service::NS::ConvertToApplicationLanguage(language_code)
|
||||||
|
.value_or(Service::NS::ApplicationLanguage::AmericanEnglish);
|
||||||
|
const auto language_priority_list =
|
||||||
|
Service::NS::GetApplicationLanguagePriorityList(application_language);
|
||||||
|
|
||||||
|
// Convert to language names
|
||||||
|
auto priority_language_names = FileSys::LANGUAGE_NAMES; // Copy
|
||||||
|
if (language_priority_list) {
|
||||||
|
for (size_t i = 0; i < priority_language_names.size(); ++i) {
|
||||||
|
// Relies on FileSys::LANGUAGE_NAMES being in the same order as
|
||||||
|
// Service::NS::ApplicationLanguage
|
||||||
|
const auto language_index = static_cast<u8>(language_priority_list->at(i));
|
||||||
|
|
||||||
|
if (language_index < FileSys::LANGUAGE_NAMES.size()) {
|
||||||
|
priority_language_names[i] = FileSys::LANGUAGE_NAMES[language_index];
|
||||||
|
} else {
|
||||||
|
// Not a catastrophe, unlikely to happen
|
||||||
|
LOG_WARNING(Loader, "Invalid language index {}", language_index);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get first matching icon
|
||||||
VirtualFile icon_file;
|
VirtualFile icon_file;
|
||||||
for (const auto& language : FileSys::LANGUAGE_NAMES) {
|
for (const auto& language : priority_language_names) {
|
||||||
icon_file = extracted->GetFile(std::string("icon_").append(language).append(".dat"));
|
icon_file = extracted->GetFile(std::string("icon_").append(language).append(".dat"));
|
||||||
if (icon_file != nullptr) {
|
if (icon_file != nullptr) {
|
||||||
break;
|
break;
|
||||||
|
@ -968,6 +968,7 @@ void FSP_SRV::ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute(HLERequ
|
|||||||
void FSP_SRV::OpenDataStorageByCurrentProcess(HLERequestContext& ctx) {
|
void FSP_SRV::OpenDataStorageByCurrentProcess(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_FS, "called");
|
LOG_DEBUG(Service_FS, "called");
|
||||||
|
|
||||||
|
if (!romfs) {
|
||||||
auto current_romfs = fsc.OpenRomFSCurrentProcess();
|
auto current_romfs = fsc.OpenRomFSCurrentProcess();
|
||||||
if (current_romfs.Failed()) {
|
if (current_romfs.Failed()) {
|
||||||
// TODO (bunnei): Find the right error code to use here
|
// TODO (bunnei): Find the right error code to use here
|
||||||
@ -977,7 +978,10 @@ void FSP_SRV::OpenDataStorageByCurrentProcess(HLERequestContext& ctx) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto storage = std::make_shared<IStorage>(system, std::move(current_romfs.Unwrap()));
|
romfs = current_romfs.Unwrap();
|
||||||
|
}
|
||||||
|
|
||||||
|
auto storage = std::make_shared<IStorage>(system, romfs);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
|
@ -3491,6 +3491,7 @@ void GMainWindow::ResetWindowSize1080() {
|
|||||||
void GMainWindow::OnConfigure() {
|
void GMainWindow::OnConfigure() {
|
||||||
const auto old_theme = UISettings::values.theme;
|
const auto old_theme = UISettings::values.theme;
|
||||||
const bool old_discord_presence = UISettings::values.enable_discord_presence.GetValue();
|
const bool old_discord_presence = UISettings::values.enable_discord_presence.GetValue();
|
||||||
|
const auto old_language_index = Settings::values.language_index.GetValue();
|
||||||
|
|
||||||
Settings::SetConfiguringGlobal(true);
|
Settings::SetConfiguringGlobal(true);
|
||||||
ConfigureDialog configure_dialog(this, hotkey_registry, input_subsystem.get(), *system,
|
ConfigureDialog configure_dialog(this, hotkey_registry, input_subsystem.get(), *system,
|
||||||
@ -3559,7 +3560,7 @@ void GMainWindow::OnConfigure() {
|
|||||||
emit UpdateThemedIcons();
|
emit UpdateThemedIcons();
|
||||||
|
|
||||||
const auto reload = UISettings::values.is_game_list_reload_pending.exchange(false);
|
const auto reload = UISettings::values.is_game_list_reload_pending.exchange(false);
|
||||||
if (reload) {
|
if (reload || Settings::values.language_index.GetValue() != old_language_index) {
|
||||||
game_list->PopulateAsync(UISettings::values.game_dirs);
|
game_list->PopulateAsync(UISettings::values.game_dirs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user