diff options
Diffstat (limited to 'src/yuzu/main.cpp')
-rw-r--r-- | src/yuzu/main.cpp | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index cb9c01154d..03a909d17d 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -11,11 +11,11 @@ #endif // VFS includes must be before glad as they will conflict with Windows file api, which uses defines. -#include "applets/controller.h" -#include "applets/error.h" -#include "applets/profile_select.h" -#include "applets/software_keyboard.h" -#include "applets/web_browser.h" +#include "applets/qt_controller.h" +#include "applets/qt_error.h" +#include "applets/qt_profile_select.h" +#include "applets/qt_software_keyboard.h" +#include "applets/qt_web_browser.h" #include "common/nvidia_flags.h" #include "configuration/configure_input.h" #include "configuration/configure_per_game.h" @@ -1221,7 +1221,7 @@ void GMainWindow::AllowOSSleep() { #endif } -bool GMainWindow::LoadROM(const QString& filename, std::size_t program_index) { +bool GMainWindow::LoadROM(const QString& filename, u64 program_id, std::size_t program_index) { // Shutdown previous session if the emu thread is still active... if (emu_thread != nullptr) ShutdownGame(); @@ -1244,7 +1244,7 @@ bool GMainWindow::LoadROM(const QString& filename, std::size_t program_index) { }); const Core::System::ResultStatus result{ - system.Load(*render_window, filename.toStdString(), program_index)}; + system.Load(*render_window, filename.toStdString(), program_id, program_index)}; const auto drd_callout = (UISettings::values.callout_flags.GetValue() & static_cast<u32>(CalloutFlag::DRDDeprecation)) == 0; @@ -1331,7 +1331,8 @@ void GMainWindow::SelectAndSetCurrentUser() { Settings::values.current_user = dialog.GetIndex(); } -void GMainWindow::BootGame(const QString& filename, std::size_t program_index, StartGameType type) { +void GMainWindow::BootGame(const QString& filename, u64 program_id, std::size_t program_index, + StartGameType type) { LOG_INFO(Frontend, "yuzu starting..."); StoreRecentFile(filename); // Put the filename on top of the list @@ -1341,7 +1342,7 @@ void GMainWindow::BootGame(const QString& filename, std::size_t program_index, S auto& system = Core::System::GetInstance(); const auto v_file = Core::GetGameFileFromPath(vfs, filename.toUtf8().constData()); - const auto loader = Loader::GetLoader(system, v_file, program_index); + const auto loader = Loader::GetLoader(system, v_file, program_id, program_index); if (loader != nullptr && loader->ReadProgramId(title_id) == Loader::ResultStatus::Success && type == StartGameType::Normal) { @@ -1369,7 +1370,7 @@ void GMainWindow::BootGame(const QString& filename, std::size_t program_index, S SelectAndSetCurrentUser(); } - if (!LoadROM(filename, program_index)) + if (!LoadROM(filename, program_id, program_index)) return; // Create and start the emulation thread @@ -1431,8 +1432,10 @@ void GMainWindow::BootGame(const QString& filename, std::size_t program_index, S std::filesystem::path{filename.toStdU16String()}.filename()); } const bool is_64bit = system.Kernel().CurrentProcess()->Is64BitProcess(); - const auto instruction_set_suffix = is_64bit ? " (64-bit)" : " (32-bit)"; - title_name += instruction_set_suffix; + const auto instruction_set_suffix = is_64bit ? tr("(64-bit)") : tr("(32-bit)"); + title_name = tr("%1 %2", "%1 is the title name. %2 indicates if the title is 64-bit or 32-bit") + .arg(QString::fromStdString(title_name), instruction_set_suffix) + .toStdString(); LOG_INFO(Frontend, "Booting game: {:016X} | {} | {}", title_id, title_name, title_version); const auto gpu_vendor = system.GPU().Renderer().GetDeviceVendor(); UpdateWindowTitle(title_name, title_version, gpu_vendor); @@ -1546,8 +1549,8 @@ void GMainWindow::UpdateRecentFiles() { ui.menu_recent_files->setEnabled(num_recent_files != 0); } -void GMainWindow::OnGameListLoadFile(QString game_path) { - BootGame(game_path); +void GMainWindow::OnGameListLoadFile(QString game_path, u64 program_id) { + BootGame(game_path, program_id); } void GMainWindow::OnGameListOpenFolder(u64 program_id, GameListOpenTarget target, @@ -2448,7 +2451,7 @@ void GMainWindow::OnLoadComplete() { void GMainWindow::OnExecuteProgram(std::size_t program_index) { ShutdownGame(); - BootGame(last_filename_booted, program_index); + BootGame(last_filename_booted, 0, program_index); } void GMainWindow::ErrorDisplayDisplayError(QString error_code, QString error_text) { |