early-access version 2139

This commit is contained in:
pineappleEA 2021-10-16 02:35:29 +02:00
parent 7a26c1dff6
commit 2545e9f3e9
26 changed files with 358 additions and 359 deletions

View file

@ -1,7 +1,7 @@
yuzu emulator early access
=============
This is the source code for early-access 2134.
This is the source code for early-access 2139.
## Legal Notice

View file

@ -180,20 +180,20 @@ std::wstring UTF8ToUTF16W(const std::string& input) {
#endif
std::string StringFromFixedZeroTerminatedBuffer(const char* buffer, std::size_t max_len) {
std::string StringFromFixedZeroTerminatedBuffer(std::string_view buffer, std::size_t max_len) {
std::size_t len = 0;
while (len < max_len && buffer[len] != '\0')
while (len < buffer.length() && len < max_len && buffer[len] != '\0') {
++len;
return std::string(buffer, len);
}
return std::string(buffer.begin(), buffer.begin() + len);
}
std::u16string UTF16StringFromFixedZeroTerminatedBuffer(std::u16string_view buffer,
std::size_t max_len) {
std::size_t len = 0;
while (len < max_len && buffer[len] != '\0')
while (len < buffer.length() && len < max_len && buffer[len] != '\0') {
++len;
}
return std::u16string(buffer.begin(), buffer.begin() + len);
}

View file

@ -63,7 +63,7 @@ template <typename InIt>
* Creates a std::string from a fixed-size NUL-terminated char buffer. If the buffer isn't
* NUL-terminated then the string ends at max_len characters.
*/
[[nodiscard]] std::string StringFromFixedZeroTerminatedBuffer(const char* buffer,
[[nodiscard]] std::string StringFromFixedZeroTerminatedBuffer(std::string_view buffer,
std::size_t max_len);
/**

View file

@ -139,9 +139,9 @@ struct System::Impl {
: kernel{system}, fs_controller{system}, memory{system},
cpu_manager{system}, reporter{system}, applet_manager{system}, time_manager{system} {}
ResultStatus Run() {
SystemResultStatus Run() {
std::unique_lock<std::mutex> lk(suspend_guard);
status = ResultStatus::Success;
status = SystemResultStatus::Success;
kernel.Suspend(false);
core_timing.SyncPause(false);
@ -151,9 +151,9 @@ struct System::Impl {
return status;
}
ResultStatus Pause() {
SystemResultStatus Pause() {
std::unique_lock<std::mutex> lk(suspend_guard);
status = ResultStatus::Success;
status = SystemResultStatus::Success;
core_timing.SyncPause(true);
kernel.Suspend(true);
@ -163,23 +163,23 @@ struct System::Impl {
return status;
}
void stallForGPU(bool pause) {
if (pause) {
suspend_guard.lock();
kernel.Suspend(pause);
core_timing.SyncPause(pause);
cpu_manager.Pause(pause);
} else {
if (!is_paused) {
core_timing.SyncPause(pause);
kernel.Suspend(pause);
cpu_manager.Pause(pause);
std::unique_lock<std::mutex> StallCPU() {
std::unique_lock<std::mutex> lk(suspend_guard);
kernel.Suspend(true);
core_timing.SyncPause(true);
cpu_manager.Pause(true);
return lk;
}
suspend_guard.unlock();
void UnstallCPU() {
if (!is_paused) {
core_timing.SyncPause(false);
kernel.Suspend(false);
cpu_manager.Pause(false);
}
}
ResultStatus Init(System& system, Frontend::EmuWindow& emu_window) {
SystemResultStatus Init(System& system, Frontend::EmuWindow& emu_window) {
LOG_DEBUG(Core, "initialized OK");
device_memory = std::make_unique<Core::DeviceMemory>();
@ -217,7 +217,7 @@ struct System::Impl {
gpu_core = VideoCore::CreateGPU(emu_window, system);
if (!gpu_core) {
return ResultStatus::ErrorVideoCore;
return SystemResultStatus::ErrorVideoCore;
}
service_manager = std::make_shared<Service::SM::ServiceManager>(kernel);
@ -237,21 +237,22 @@ struct System::Impl {
LOG_DEBUG(Core, "Initialized OK");
return ResultStatus::Success;
return SystemResultStatus::Success;
}
ResultStatus Load(System& system, Frontend::EmuWindow& emu_window, const std::string& filepath,
u64 program_id, std::size_t program_index) {
SystemResultStatus Load(System& system, Frontend::EmuWindow& emu_window,
const std::string& filepath, u64 program_id,
std::size_t program_index) {
app_loader = Loader::GetLoader(system, GetGameFileFromPath(virtual_filesystem, filepath),
program_id, program_index);
if (!app_loader) {
LOG_CRITICAL(Core, "Failed to obtain loader for {}!", filepath);
return ResultStatus::ErrorGetLoader;
return SystemResultStatus::ErrorGetLoader;
}
ResultStatus init_result{Init(system, emu_window)};
if (init_result != ResultStatus::Success) {
SystemResultStatus init_result{Init(system, emu_window)};
if (init_result != SystemResultStatus::Success) {
LOG_CRITICAL(Core, "Failed to initialize system (Error {})!",
static_cast<int>(init_result));
Shutdown();
@ -269,8 +270,8 @@ struct System::Impl {
LOG_CRITICAL(Core, "Failed to load ROM (Error {})!", load_result);
Shutdown();
return static_cast<ResultStatus>(static_cast<u32>(ResultStatus::ErrorLoader) +
static_cast<u32>(load_result));
return static_cast<SystemResultStatus>(
static_cast<u32>(SystemResultStatus::ErrorLoader) + static_cast<u32>(load_result));
}
AddGlueRegistrationForProcess(*app_loader, *main_process);
kernel.MakeCurrentProcess(main_process.get());
@ -302,7 +303,7 @@ struct System::Impl {
GetAndResetPerfStats();
perf_stats->BeginSystemFrame();
status = ResultStatus::Success;
status = SystemResultStatus::Success;
return status;
}
@ -375,7 +376,7 @@ struct System::Impl {
arp_manager.Register(launch.title_id, launch, std::move(nacp_data));
}
void SetStatus(ResultStatus new_status, const char* details = nullptr) {
void SetStatus(SystemResultStatus new_status, const char* details = nullptr) {
status = new_status;
if (details) {
status_details = details;
@ -434,7 +435,7 @@ struct System::Impl {
/// Network instance
Network::NetworkInstance network_instance;
ResultStatus status = ResultStatus::Success;
SystemResultStatus status = SystemResultStatus::Success;
std::string status_details = "";
std::unique_ptr<Core::PerfStats> perf_stats;
@ -451,22 +452,9 @@ struct System::Impl {
};
System::System() : impl{std::make_unique<Impl>(*this)} {}
System::~System() = default;
System& System::GetInstance() {
if (!s_instance) {
throw std::runtime_error("Using System instance before its initialization");
}
return *s_instance;
}
void System::InitializeGlobalInstance() {
if (s_instance) {
throw std::runtime_error("Reinitializing Global System instance.");
}
s_instance = std::unique_ptr<System>(new System);
}
CpuManager& System::GetCpuManager() {
return impl->cpu_manager;
}
@ -475,16 +463,16 @@ const CpuManager& System::GetCpuManager() const {
return impl->cpu_manager;
}
System::ResultStatus System::Run() {
SystemResultStatus System::Run() {
return impl->Run();
}
System::ResultStatus System::Pause() {
SystemResultStatus System::Pause() {
return impl->Pause();
}
System::ResultStatus System::SingleStep() {
return ResultStatus::Success;
SystemResultStatus System::SingleStep() {
return SystemResultStatus::Success;
}
void System::InvalidateCpuInstructionCaches() {
@ -499,11 +487,15 @@ void System::Shutdown() {
impl->Shutdown();
}
void System::stallForGPU(bool pause) {
impl->stallForGPU(pause);
std::unique_lock<std::mutex> System::StallCPU() {
return impl->StallCPU();
}
System::ResultStatus System::Load(Frontend::EmuWindow& emu_window, const std::string& filepath,
void System::UnstallCPU() {
impl->UnstallCPU();
}
SystemResultStatus System::Load(Frontend::EmuWindow& emu_window, const std::string& filepath,
u64 program_id, std::size_t program_index) {
return impl->Load(*this, emu_window, filepath, program_id, program_index);
}
@ -664,7 +656,7 @@ Loader::ResultStatus System::GetGameName(std::string& out) const {
return impl->GetGameName(out);
}
void System::SetStatus(ResultStatus new_status, const char* details) {
void System::SetStatus(SystemResultStatus new_status, const char* details) {
impl->SetStatus(new_status, details);
}

View file

@ -7,6 +7,7 @@
#include <cstddef>
#include <functional>
#include <memory>
#include <mutex>
#include <string>
#include <vector>
@ -104,28 +105,8 @@ struct PerfStatsResults;
FileSys::VirtualFile GetGameFileFromPath(const FileSys::VirtualFilesystem& vfs,
const std::string& path);
class System {
public:
using CurrentBuildProcessID = std::array<u8, 0x20>;
System(const System&) = delete;
System& operator=(const System&) = delete;
System(System&&) = delete;
System& operator=(System&&) = delete;
~System();
/**
* Gets the instance of the System singleton class.
* @returns Reference to the instance of the System singleton class.
*/
[[deprecated("Use of the global system instance is deprecated")]] static System& GetInstance();
static void InitializeGlobalInstance();
/// Enumeration representing the return values of the System Initialize and Load process.
enum class ResultStatus : u32 {
enum class SystemResultStatus : u32 {
Success, ///< Succeeded
ErrorNotInitialized, ///< Error trying to use core prior to initialization
ErrorGetLoader, ///< Error finding the correct application loader
@ -136,23 +117,37 @@ public:
ErrorLoader, ///< The base for loader errors (too many to repeat)
};
class System {
public:
using CurrentBuildProcessID = std::array<u8, 0x20>;
explicit System();
~System();
System(const System&) = delete;
System& operator=(const System&) = delete;
System(System&&) = delete;
System& operator=(System&&) = delete;
/**
* Run the OS and Application
* This function will start emulation and run the relevant devices
*/
[[nodiscard]] ResultStatus Run();
[[nodiscard]] SystemResultStatus Run();
/**
* Pause the OS and Application
* This function will pause emulation and stop the relevant devices
*/
[[nodiscard]] ResultStatus Pause();
[[nodiscard]] SystemResultStatus Pause();
/**
* Step the CPU one instruction
* @return Result status, indicating whether or not the operation succeeded.
*/
[[nodiscard]] ResultStatus SingleStep();
[[nodiscard]] SystemResultStatus SingleStep();
/**
* Invalidate the CPU instruction caches
@ -166,7 +161,8 @@ public:
/// Shutdown the emulated system.
void Shutdown();
void stallForGPU(bool pause);
std::unique_lock<std::mutex> StallCPU();
void UnstallCPU();
/**
* Load an executable application.
@ -174,10 +170,11 @@ public:
* input.
* @param filepath String path to the executable application to load on the host file system.
* @param program_index Specifies the index within the container of the program to launch.
* @returns ResultStatus code, indicating if the operation succeeded.
* @returns SystemResultStatus code, indicating if the operation succeeded.
*/
[[nodiscard]] ResultStatus Load(Frontend::EmuWindow& emu_window, const std::string& filepath,
u64 program_id = 0, std::size_t program_index = 0);
[[nodiscard]] SystemResultStatus Load(Frontend::EmuWindow& emu_window,
const std::string& filepath, u64 program_id = 0,
std::size_t program_index = 0);
/**
* Indicates if the emulated system is powered on (all subsystems initialized and able to run an
@ -303,7 +300,7 @@ public:
/// Gets the name of the current game
[[nodiscard]] Loader::ResultStatus GetGameName(std::string& out) const;
void SetStatus(ResultStatus new_status, const char* details);
void SetStatus(SystemResultStatus new_status, const char* details);
[[nodiscard]] const std::string& GetStatusDetails() const;
@ -405,12 +402,8 @@ public:
void ApplySettings();
private:
System();
struct Impl;
std::unique_ptr<Impl> impl;
inline static std::unique_ptr<System> s_instance{};
};
} // namespace Core

View file

@ -150,9 +150,11 @@ NvResult nvhost_ctrl::IocCtrlEventWait(const std::vector<u8>& input, std::vector
params.value |= event_id;
event.event->GetWritableEvent().Clear();
if (events_interface.failed[event_id]) {
system.stallForGPU(true);
{
auto lk = system.StallCPU();
gpu.WaitFence(params.syncpt_id, target_value);
system.stallForGPU(false);
system.UnstallCPU();
}
std::memcpy(output.data(), &params, sizeof(params));
events_interface.failed[event_id] = false;
return NvResult::Success;

View file

@ -8,7 +8,8 @@
#include "ui_aboutdialog.h"
#include "yuzu/about_dialog.h"
AboutDialog::AboutDialog(QWidget* parent) : QDialog(parent), ui(new Ui::AboutDialog) {
AboutDialog::AboutDialog(QWidget* parent)
: QDialog(parent), ui{std::make_unique<Ui::AboutDialog>()} {
const auto branch_name = std::string(Common::g_scm_branch);
const auto description = std::string(Common::g_scm_desc);
const auto build_id = std::string(Common::g_build_id);

View file

@ -3,6 +3,7 @@
// Refer to the license.txt file included.
#ifdef YUZU_USE_QT_WEB_ENGINE
#include <QApplication>
#include <QKeyEvent>
#include <QWebEngineProfile>

View file

@ -86,15 +86,15 @@ void EmuThread::run() {
}
running_guard = true;
Core::System::ResultStatus result = system.Run();
if (result != Core::System::ResultStatus::Success) {
Core::SystemResultStatus result = system.Run();
if (result != Core::SystemResultStatus::Success) {
running_guard = false;
this->SetRunning(false);
emit ErrorThrown(result, system.GetStatusDetails());
}
running_wait.Wait();
result = system.Pause();
if (result != Core::System::ResultStatus::Success) {
if (result != Core::SystemResultStatus::Success) {
running_guard = false;
this->SetRunning(false);
emit ErrorThrown(result, system.GetStatusDetails());

View file

@ -16,7 +16,6 @@
#include <QWindow>
#include "common/thread.h"
#include "core/core.h"
#include "core/frontend/emu_window.h"
class GRenderWindow;
@ -24,6 +23,11 @@ class GMainWindow;
class QKeyEvent;
class QStringList;
namespace Core {
enum class SystemResultStatus : u32;
class System;
} // namespace Core
namespace InputCommon {
class InputSubsystem;
}
@ -123,7 +127,7 @@ signals:
*/
void DebugModeLeft();
void ErrorThrown(Core::System::ResultStatus, std::string);
void ErrorThrown(Core::SystemResultStatus, std::string);
void LoadProgress(VideoCore::LoadCallbackStage stage, std::size_t value, std::size_t total);
};

View file

@ -14,7 +14,7 @@
#include "yuzu/configuration/configure_cpu.h"
ConfigureCpu::ConfigureCpu(const Core::System& system_, QWidget* parent)
: QWidget(parent), ui(new Ui::ConfigureCpu), system{system_} {
: QWidget(parent), ui{std::make_unique<Ui::ConfigureCpu>()}, system{system_} {
ui->setupUi(this);
SetupPerGameUI();

View file

@ -12,7 +12,7 @@
#include "yuzu/configuration/configure_cpu_debug.h"
ConfigureCpuDebug::ConfigureCpuDebug(const Core::System& system_, QWidget* parent)
: QWidget(parent), ui(new Ui::ConfigureCpuDebug), system{system_} {
: QWidget(parent), ui{std::make_unique<Ui::ConfigureCpuDebug>()}, system{system_} {
ui->setupUi(this);
SetConfiguration();

View file

@ -15,7 +15,7 @@
#include "yuzu/uisettings.h"
ConfigureDebug::ConfigureDebug(const Core::System& system_, QWidget* parent)
: QWidget(parent), ui(new Ui::ConfigureDebug), system{system_} {
: QWidget(parent), ui{std::make_unique<Ui::ConfigureDebug>()}, system{system_} {
ui->setupUi(this);
SetConfiguration();

View file

@ -9,8 +9,8 @@
#include "yuzu/configuration/configure_debug_tab.h"
ConfigureDebugTab::ConfigureDebugTab(const Core::System& system_, QWidget* parent)
: QWidget(parent),
ui(new Ui::ConfigureDebugTab), debug_tab{std::make_unique<ConfigureDebug>(system_, this)},
: QWidget(parent), ui{std::make_unique<Ui::ConfigureDebugTab>()},
debug_tab{std::make_unique<ConfigureDebug>(system_, this)},
cpu_debug_tab{std::make_unique<ConfigureCpuDebug>(system_, this)} {
ui->setupUi(this);

View file

@ -36,7 +36,7 @@
ConfigureDialog::ConfigureDialog(QWidget* parent, HotkeyRegistry& registry,
InputCommon::InputSubsystem* input_subsystem,
Core::System& system_)
: QDialog(parent), ui(new Ui::ConfigureDialog),
: QDialog(parent), ui{std::make_unique<Ui::ConfigureDialog>()},
registry(registry), system{system_}, audio_tab{std::make_unique<ConfigureAudio>(system_,
this)},
cpu_tab{std::make_unique<ConfigureCpu>(system_, this)},

View file

@ -16,7 +16,7 @@
#include "yuzu/uisettings.h"
ConfigureGeneral::ConfigureGeneral(const Core::System& system_, QWidget* parent)
: QWidget(parent), ui(new Ui::ConfigureGeneral), system{system_} {
: QWidget(parent), ui{std::make_unique<Ui::ConfigureGeneral>()}, system{system_} {
ui->setupUi(this);
SetupPerGameUI();

View file

@ -20,7 +20,7 @@
#include "yuzu/configuration/configure_graphics.h"
ConfigureGraphics::ConfigureGraphics(const Core::System& system_, QWidget* parent)
: QWidget(parent), ui(new Ui::ConfigureGraphics), system{system_} {
: QWidget(parent), ui{std::make_unique<Ui::ConfigureGraphics>()}, system{system_} {
vulkan_device = Settings::values.vulkan_device.GetValue();
RetrieveVulkanDevices();

View file

@ -9,7 +9,7 @@
#include "yuzu/configuration/configure_graphics_advanced.h"
ConfigureGraphicsAdvanced::ConfigureGraphicsAdvanced(const Core::System& system_, QWidget* parent)
: QWidget(parent), ui(new Ui::ConfigureGraphicsAdvanced), system{system_} {
: QWidget(parent), ui{std::make_unique<Ui::ConfigureGraphicsAdvanced>()}, system{system_} {
ui->setupUi(this);

View file

@ -27,7 +27,7 @@
#include "yuzu/util/util.h"
ConfigurePerGameAddons::ConfigurePerGameAddons(Core::System& system_, QWidget* parent)
: QWidget(parent), ui(new Ui::ConfigurePerGameAddons), system{system_} {
: QWidget(parent), ui{std::make_unique<Ui::ConfigurePerGameAddons>()}, system{system_} {
ui->setupUi(this);
layout = new QVBoxLayout;

View file

@ -77,7 +77,7 @@ QString GetProfileUsernameFromUser(QWidget* parent, const QString& description_t
} // Anonymous namespace
ConfigureProfileManager::ConfigureProfileManager(const Core::System& system_, QWidget* parent)
: QWidget(parent), ui(new Ui::ConfigureProfileManager),
: QWidget(parent), ui{std::make_unique<Ui::ConfigureProfileManager>()},
profile_manager(std::make_unique<Service::Account::ProfileManager>()), system{system_} {
ui->setupUi(this);

View file

@ -18,7 +18,7 @@
#include "yuzu/configuration/configure_system.h"
ConfigureSystem::ConfigureSystem(Core::System& system_, QWidget* parent)
: QWidget(parent), ui(new Ui::ConfigureSystem), system{system_} {
: QWidget(parent), ui{std::make_unique<Ui::ConfigureSystem>()}, system{system_} {
ui->setupUi(this);
connect(ui->button_regenerate_console_id, &QPushButton::clicked, this,
&ConfigureSystem::RefreshConsoleID);

View file

@ -55,7 +55,7 @@ QString GetTranslatedRowTextName(size_t index) {
} // Anonymous namespace
ConfigureUi::ConfigureUi(Core::System& system_, QWidget* parent)
: QWidget(parent), ui(new Ui::ConfigureUi), system{system_} {
: QWidget(parent), ui{std::make_unique<Ui::ConfigureUi>()}, system{system_} {
ui->setupUi(this);
InitializeLanguageComboBox();

File diff suppressed because it is too large Load diff

View file

@ -13,9 +13,7 @@
#include <QTranslator>
#include "common/common_types.h"
#include "core/core.h"
#include "core/hle/service/acc/profile_manager.h"
#include "ui_main.h"
#include "yuzu/compatibility_list.h"
#include "yuzu/hotkeys.h"
@ -45,6 +43,11 @@ enum class StartGameType {
Global, // Only uses global configuration
};
namespace Core {
enum class SystemResultStatus : u32;
class System;
} // namespace Core
namespace Core::Frontend {
struct ControllerParameters;
struct InlineAppearParameters;
@ -73,6 +76,10 @@ enum class SwkbdReplyType : u32;
enum class WebExitReason : u32;
} // namespace Service::AM::Applets
namespace Ui {
class MainWindow;
}
enum class EmulatedDirectoryTarget {
NAND,
SDMC,
@ -107,7 +114,7 @@ class GMainWindow : public QMainWindow {
public:
void filterBarSetChecked(bool state);
void UpdateUITheme();
GMainWindow(Core::System& system_);
explicit GMainWindow();
~GMainWindow() override;
bool DropAction(QDropEvent* event);
@ -277,7 +284,7 @@ private slots:
void ResetWindowSize900();
void ResetWindowSize1080();
void OnCaptureScreenshot();
void OnCoreError(Core::System::ResultStatus, std::string);
void OnCoreError(Core::SystemResultStatus, std::string);
void OnReinitializeKeys(ReinitializeKeyBehavior behavior);
void OnLanguageChanged(const QString& locale);
void OnMouseActivity();
@ -306,13 +313,12 @@ private:
void OpenPerGameConfiguration(u64 title_id, const std::string& file_name);
QString GetTasStateDescription() const;
Ui::MainWindow ui;
std::unique_ptr<Ui::MainWindow> ui;
std::unique_ptr<Core::System> system;
std::unique_ptr<DiscordRPC::DiscordInterface> discord_rpc;
std::shared_ptr<InputCommon::InputSubsystem> input_subsystem;
Core::System& system;
GRenderWindow* render_window;
GameList* game_list;
LoadingScreen* loading_screen;

View file

@ -60,7 +60,7 @@ struct Values {
Settings::BasicSetting<bool> confirm_before_closing{true, "confirmClose"};
Settings::BasicSetting<bool> first_start{true, "firstStart"};
Settings::BasicSetting<bool> pause_when_in_background{false, "pauseWhenInBackground"};
Settings::BasicSetting<bool> hide_mouse{false, "hideInactiveMouse"};
Settings::BasicSetting<bool> hide_mouse{true, "hideInactiveMouse"};
Settings::BasicSetting<bool> select_user_on_boot{false, "select_user_on_boot"};

View file

@ -146,9 +146,8 @@ int main(int argc, char** argv) {
return -1;
}
Core::System::InitializeGlobalInstance();
auto& system{Core::System::GetInstance()};
InputCommon::InputSubsystem input_subsystem;
Core::System system{};
InputCommon::InputSubsystem input_subsystem{};
// Apply the command line arguments
system.ApplySettings();
@ -167,27 +166,27 @@ int main(int argc, char** argv) {
system.SetFilesystem(std::make_shared<FileSys::RealVfsFilesystem>());
system.GetFileSystemController().CreateFactories(*system.GetFilesystem());
const Core::System::ResultStatus load_result{system.Load(*emu_window, filepath)};
const Core::SystemResultStatus load_result{system.Load(*emu_window, filepath)};
switch (load_result) {
case Core::System::ResultStatus::ErrorGetLoader:
case Core::SystemResultStatus::ErrorGetLoader:
LOG_CRITICAL(Frontend, "Failed to obtain loader for {}!", filepath);
return -1;
case Core::System::ResultStatus::ErrorLoader:
case Core::SystemResultStatus::ErrorLoader:
LOG_CRITICAL(Frontend, "Failed to load ROM!");
return -1;
case Core::System::ResultStatus::ErrorNotInitialized:
case Core::SystemResultStatus::ErrorNotInitialized:
LOG_CRITICAL(Frontend, "CPUCore not initialized");
return -1;
case Core::System::ResultStatus::ErrorVideoCore:
case Core::SystemResultStatus::ErrorVideoCore:
LOG_CRITICAL(Frontend, "Failed to initialize VideoCore!");
return -1;
case Core::System::ResultStatus::Success:
case Core::SystemResultStatus::Success:
break; // Expected case
default:
if (static_cast<u32>(load_result) >
static_cast<u32>(Core::System::ResultStatus::ErrorLoader)) {
const u16 loader_id = static_cast<u16>(Core::System::ResultStatus::ErrorLoader);
static_cast<u32>(Core::SystemResultStatus::ErrorLoader)) {
const u16 loader_id = static_cast<u16>(Core::SystemResultStatus::ErrorLoader);
const u16 error_id = static_cast<u16>(load_result) - loader_id;
LOG_CRITICAL(Frontend,
"While attempting to load the ROM requested, an error occurred. Please "