diff options
Diffstat (limited to '')
-rw-r--r-- | src/common/logging/backend.cpp | 5 | ||||
-rw-r--r-- | src/common/logging/log.h | 8 | ||||
-rw-r--r-- | src/core/core.cpp | 4 | ||||
-rw-r--r-- | src/core/core.h | 1 | ||||
-rw-r--r-- | src/core/loader/deconstructed_rom_directory.cpp | 5 | ||||
-rw-r--r-- | src/core/loader/loader.h | 1 | ||||
-rw-r--r-- | src/yuzu/main.cpp | 7 |
7 files changed, 25 insertions, 6 deletions
diff --git a/src/common/logging/backend.cpp b/src/common/logging/backend.cpp index 625730c6a..26cd75a3e 100644 --- a/src/common/logging/backend.cpp +++ b/src/common/logging/backend.cpp @@ -146,8 +146,9 @@ void LogMessage(Class log_class, Level log_level, const char* filename, unsigned PrintColoredMessage(entry); } -void LogMessage(Class log_class, Level log_level, const char* filename, unsigned int line_num, - const char* function, const char* format, const fmt::format_args& args) { +void FmtLogMessageImpl(Class log_class, Level log_level, const char* filename, + unsigned int line_num, const char* function, const char* format, + const fmt::format_args& args) { if (filter && !filter->CheckMessage(log_class, log_level)) return; Entry entry = diff --git a/src/common/logging/log.h b/src/common/logging/log.h index 3c9da7f55..45821850c 100644 --- a/src/common/logging/log.h +++ b/src/common/logging/log.h @@ -105,13 +105,15 @@ void LogMessage(Class log_class, Level log_level, const char* filename, unsigned ; /// Logs a message to the global logger, using fmt -void LogMessage(Class log_class, Level log_level, const char* filename, unsigned int line_num, - const char* function, const char* format, const fmt::format_args& args); +void FmtLogMessageImpl(Class log_class, Level log_level, const char* filename, + unsigned int line_num, const char* function, const char* format, + const fmt::format_args& args); template <typename... Args> void FmtLogMessage(Class log_class, Level log_level, const char* filename, unsigned int line_num, const char* function, const char* format, const Args&... args) { - LogMessage(log_class, log_level, filename, line_num, function, format, fmt::make_args(args...)); + FmtLogMessageImpl(log_class, log_level, filename, line_num, function, format, + fmt::make_args(args...)); } } // namespace Log diff --git a/src/core/core.cpp b/src/core/core.cpp index 11654d4da..9f5507a65 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -92,6 +92,8 @@ System::ResultStatus System::Load(EmuWindow* emu_window, const std::string& file return ResultStatus::ErrorLoader_ErrorEncrypted; case Loader::ResultStatus::ErrorInvalidFormat: return ResultStatus::ErrorLoader_ErrorInvalidFormat; + case Loader::ResultStatus::ErrorUnsupportedArch: + return ResultStatus::ErrorUnsupportedArch; default: return ResultStatus::ErrorSystemMode; } @@ -115,6 +117,8 @@ System::ResultStatus System::Load(EmuWindow* emu_window, const std::string& file return ResultStatus::ErrorLoader_ErrorEncrypted; case Loader::ResultStatus::ErrorInvalidFormat: return ResultStatus::ErrorLoader_ErrorInvalidFormat; + case Loader::ResultStatus::ErrorUnsupportedArch: + return ResultStatus::ErrorUnsupportedArch; default: return ResultStatus::ErrorLoader; } diff --git a/src/core/core.h b/src/core/core.h index ade456cfc..f497dc022 100644 --- a/src/core/core.h +++ b/src/core/core.h @@ -44,6 +44,7 @@ public: ErrorSystemFiles, ///< Error in finding system files ErrorSharedFont, ///< Error in finding shared font ErrorVideoCore, ///< Error in the video core + ErrorUnsupportedArch, ///< Unsupported Architecture (32-Bit ROMs) ErrorUnknown ///< Any other error }; diff --git a/src/core/loader/deconstructed_rom_directory.cpp b/src/core/loader/deconstructed_rom_directory.cpp index 8b4ee970f..8696c28bd 100644 --- a/src/core/loader/deconstructed_rom_directory.cpp +++ b/src/core/loader/deconstructed_rom_directory.cpp @@ -119,6 +119,11 @@ ResultStatus AppLoader_DeconstructedRomDirectory::Load( } metadata.Print(); + const FileSys::ProgramAddressSpaceType arch_bits{metadata.GetAddressSpaceType()}; + if (arch_bits == FileSys::ProgramAddressSpaceType::Is32Bit) { + return ResultStatus::ErrorUnsupportedArch; + } + // Load NSO modules VAddr next_load_addr{Memory::PROCESS_IMAGE_VADDR}; for (const auto& module : {"rtld", "main", "subsdk0", "subsdk1", "subsdk2", "subsdk3", diff --git a/src/core/loader/loader.h b/src/core/loader/loader.h index dd44ee9a6..b1aabb1cb 100644 --- a/src/core/loader/loader.h +++ b/src/core/loader/loader.h @@ -72,6 +72,7 @@ enum class ResultStatus { ErrorAlreadyLoaded, ErrorMemoryAllocationFailed, ErrorEncrypted, + ErrorUnsupportedArch, }; /// Interface for loading an application diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 793d9d739..936a2759b 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -357,7 +357,12 @@ bool GMainWindow::LoadROM(const QString& filename) { QMessageBox::critical(this, tr("Error while loading ROM!"), tr("The ROM format is not supported.")); break; - + case Core::System::ResultStatus::ErrorUnsupportedArch: + LOG_CRITICAL(Frontend, "Unsupported architecture detected!", + filename.toStdString().c_str()); + QMessageBox::critical(this, tr("Error while loading ROM!"), + tr("The ROM uses currently unusable 32-bit architecture")); + break; case Core::System::ResultStatus::ErrorSystemMode: LOG_CRITICAL(Frontend, "Failed to load ROM!"); QMessageBox::critical(this, tr("Error while loading ROM!"), |