Call emuPause before loading a ROM so we don't crash if one is already loaded

This commit is contained in:
Nadia Holmquist Pedersen 2021-08-23 10:45:18 +02:00
parent 6ad0e8d61a
commit 0d37a0a5fc
1 changed files with 2 additions and 1 deletions

View File

@ -2737,7 +2737,8 @@ bool MelonApplication::event(QEvent *event)
if (event->type() == QEvent::FileOpen)
{
QFileOpenEvent *openEvent = static_cast<QFileOpenEvent*>(event);
printf("%s\n", openEvent->file().toUtf8().constData());
emuThread->emuPause();
mainWindow->loadROM(openEvent->file());
}