From 5cbafe3cfec9515706fbac2b34c6448cf27602bd Mon Sep 17 00:00:00 2001 From: pineappleEA Date: Tue, 5 Dec 2023 06:54:16 +0100 Subject: [PATCH] early-access version 4008 --- README.md | 2 +- src/core/arm/dynarmic/arm_dynarmic_32.cpp | 10 ++++------ src/yuzu/configuration/qt_config.cpp | 3 ++- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 7ca2361c3..c0b97fee7 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ yuzu emulator early access ============= -This is the source code for early-access 4007. +This is the source code for early-access 4008. ## Legal Notice diff --git a/src/core/arm/dynarmic/arm_dynarmic_32.cpp b/src/core/arm/dynarmic/arm_dynarmic_32.cpp index cb9e65e27..9031b3bdb 100755 --- a/src/core/arm/dynarmic/arm_dynarmic_32.cpp +++ b/src/core/arm/dynarmic/arm_dynarmic_32.cpp @@ -400,9 +400,8 @@ void ArmDynarmic32::GetContext(Kernel::Svc::ThreadContext& ctx) const { ctx.pc = gpr[15]; ctx.pstate = j.Cpsr(); - for (size_t i = 0; i < 32; i++) { - ctx.v[i] = {fpr[i], 0}; - } + static_assert(sizeof(fpr) <= sizeof(ctx.v)); + std::memcpy(ctx.v.data(), &fpr, sizeof(fpr)); auto [fpsr, fpcr] = FpscrToFpsrFpcr(j.Fpscr()); ctx.fpcr = fpcr; @@ -421,9 +420,8 @@ void ArmDynarmic32::SetContext(const Kernel::Svc::ThreadContext& ctx) { j.SetCpsr(ctx.pstate); - for (size_t i = 0; i < 32; i++) { - fpr[i] = static_cast(ctx.v[i][0]); - } + static_assert(sizeof(fpr) <= sizeof(ctx.v)); + std::memcpy(&fpr, ctx.v.data(), sizeof(fpr)); j.SetFpscr(FpsrFpcrToFpscr(ctx.fpsr, ctx.fpcr)); m_cp15->uprw = static_cast(ctx.tpidr); diff --git a/src/yuzu/configuration/qt_config.cpp b/src/yuzu/configuration/qt_config.cpp index 5a8e69aa9..636c5e640 100755 --- a/src/yuzu/configuration/qt_config.cpp +++ b/src/yuzu/configuration/qt_config.cpp @@ -225,7 +225,8 @@ void QtConfig::ReadPathValues() { UISettings::values.recent_files = QString::fromStdString(ReadStringSetting(std::string("recentFiles"))) .split(QStringLiteral(", "), Qt::SkipEmptyParts, Qt::CaseSensitive); - UISettings::values.language = ReadStringSetting(std::string("language"), std::string("")); + UISettings::values.language = + ReadStringSetting(std::string("language"), std::make_optional(std::string(""))); EndGroup(); }