mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-07-09 17:25:18 -06:00
Qt: Allow to boot iso files from menu
This commit is contained in:
parent
41a5c69db4
commit
6bd4f52173
@ -700,6 +700,34 @@ void main_window::BootGame()
|
|||||||
Boot(dir_path.toStdString(), "", false, true);
|
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()
|
void main_window::BootVSH()
|
||||||
{
|
{
|
||||||
gui_log.notice("Booting from 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->bootElfAct, &QAction::triggered, this, &main_window::BootElf);
|
||||||
connect(ui->bootTestAct, &QAction::triggered, this, &main_window::BootTest);
|
connect(ui->bootTestAct, &QAction::triggered, this, &main_window::BootTest);
|
||||||
connect(ui->bootGameAct, &QAction::triggered, this, &main_window::BootGame);
|
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->bootVSHAct, &QAction::triggered, this, &main_window::BootVSH);
|
||||||
connect(ui->actionopen_rsx_capture, &QAction::triggered, this, [this](){ BootRsxCapture(); });
|
connect(ui->actionopen_rsx_capture, &QAction::triggered, this, [this](){ BootRsxCapture(); });
|
||||||
connect(ui->actionCreate_RSX_Capture, &QAction::triggered, this, []()
|
connect(ui->actionCreate_RSX_Capture, &QAction::triggered, this, []()
|
||||||
|
|||||||
@ -104,6 +104,7 @@ private Q_SLOTS:
|
|||||||
void BootElf();
|
void BootElf();
|
||||||
void BootTest();
|
void BootTest();
|
||||||
void BootGame();
|
void BootGame();
|
||||||
|
void BootISO();
|
||||||
void BootVSH();
|
void BootVSH();
|
||||||
void BootSavestate();
|
void BootSavestate();
|
||||||
void BootRsxCapture(std::string path = "");
|
void BootRsxCapture(std::string path = "");
|
||||||
|
|||||||
@ -62,7 +62,6 @@
|
|||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<pointsize>10</pointsize>
|
<pointsize>10</pointsize>
|
||||||
<weight>50</weight>
|
|
||||||
<bold>false</bold>
|
<bold>false</bold>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
@ -211,6 +210,7 @@
|
|||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
</widget>
|
</widget>
|
||||||
<addaction name="bootGameAct"/>
|
<addaction name="bootGameAct"/>
|
||||||
|
<addaction name="bootIsoAct"/>
|
||||||
<addaction name="bootVSHAct"/>
|
<addaction name="bootVSHAct"/>
|
||||||
<addaction name="bootElfMenu"/>
|
<addaction name="bootElfMenu"/>
|
||||||
<addaction name="bootSavestateAct"/>
|
<addaction name="bootSavestateAct"/>
|
||||||
@ -1519,6 +1519,11 @@
|
|||||||
<string>Add ISO Games</string>
|
<string>Add ISO Games</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="bootIsoAct">
|
||||||
|
<property name="text">
|
||||||
|
<string>Boot ISO</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<layoutdefault spacing="6" margin="11"/>
|
<layoutdefault spacing="6" margin="11"/>
|
||||||
<resources>
|
<resources>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user