diff --git a/rpcs3/rpcs3qt/main_window.cpp b/rpcs3/rpcs3qt/main_window.cpp index bd910e0698..56e125ab11 100644 --- a/rpcs3/rpcs3qt/main_window.cpp +++ b/rpcs3/rpcs3qt/main_window.cpp @@ -700,6 +700,34 @@ void main_window::BootGame() Boot(dir_path.toStdString(), "", false, true); } +void main_window::BootISO() +{ + bool stopped = false; + + if (Emu.IsRunning()) + { + Emu.Pause(); + stopped = true; + } + + const QString path_last_game = m_gui_settings->GetValue(gui::fd_boot_game).toString(); + const QString path = QFileDialog::getOpenFileName(this, tr("Select ISO"), path_last_game, tr("ISO files (*.iso);;All files (*.*)")); + + if (path.isEmpty()) + { + if (stopped) + { + Emu.Resume(); + } + return; + } + + m_gui_settings->SetValue(gui::fd_boot_game, QFileInfo(path).dir().path()); + + gui_log.notice("Booting from BootISO..."); + Boot(path.toStdString(), "", true, true); +} + void main_window::BootVSH() { gui_log.notice("Booting from BootVSH..."); @@ -2479,6 +2507,7 @@ void main_window::CreateConnects() connect(ui->bootElfAct, &QAction::triggered, this, &main_window::BootElf); connect(ui->bootTestAct, &QAction::triggered, this, &main_window::BootTest); connect(ui->bootGameAct, &QAction::triggered, this, &main_window::BootGame); + connect(ui->bootIsoAct, &QAction::triggered, this, &main_window::BootISO); connect(ui->bootVSHAct, &QAction::triggered, this, &main_window::BootVSH); connect(ui->actionopen_rsx_capture, &QAction::triggered, this, [this](){ BootRsxCapture(); }); connect(ui->actionCreate_RSX_Capture, &QAction::triggered, this, []() diff --git a/rpcs3/rpcs3qt/main_window.h b/rpcs3/rpcs3qt/main_window.h index ada8f01cad..588c6e6918 100644 --- a/rpcs3/rpcs3qt/main_window.h +++ b/rpcs3/rpcs3qt/main_window.h @@ -104,6 +104,7 @@ private Q_SLOTS: void BootElf(); void BootTest(); void BootGame(); + void BootISO(); void BootVSH(); void BootSavestate(); void BootRsxCapture(std::string path = ""); diff --git a/rpcs3/rpcs3qt/main_window.ui b/rpcs3/rpcs3qt/main_window.ui index 9b9853d315..1f6a75c6f7 100644 --- a/rpcs3/rpcs3qt/main_window.ui +++ b/rpcs3/rpcs3qt/main_window.ui @@ -62,7 +62,6 @@ 10 - 50 false @@ -211,6 +210,7 @@ + @@ -1519,6 +1519,11 @@ Add ISO Games + + + Boot ISO + +