mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-24 22:59:58 -06:00
onClickRecentFile : Pause emu thread conditionally
* Don't pause at start of the function * If user opens an archive and hits cancel, it won't pause Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com>
This commit is contained in:
@ -1718,12 +1718,12 @@ void MainWindow::updateRecentFilesMenu()
|
||||
|
||||
void MainWindow::onClickRecentFile()
|
||||
{
|
||||
emuThread->emuPause();
|
||||
QAction *act = (QAction *)sender();
|
||||
QString fileName = act->data().toString();
|
||||
|
||||
if(fileName.endsWith(".gba") || fileName.endsWith(".nds"))
|
||||
{
|
||||
emuThread->emuPause();
|
||||
loadROM(fileName);
|
||||
}
|
||||
else
|
||||
@ -1734,6 +1734,7 @@ void MainWindow::onClickRecentFile()
|
||||
QString romFileName = MainWindow::pickAndExtractFileFromArchive(archiveFileName, romBuffer);
|
||||
if(!romFileName.isEmpty())
|
||||
{
|
||||
emuThread->emuPause();
|
||||
loadROM(romBuffer, archiveFileName, romFileName);
|
||||
}
|
||||
delete romBuffer;
|
||||
|
Reference in New Issue
Block a user