aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNadia Holmquist Pedersen <nadia@nhp.sh>2021-08-23 10:45:18 +0200
committerNadia Holmquist Pedersen <nadia@nhp.sh>2021-08-23 10:45:18 +0200
commit0d37a0a5fc2310197c8da92c7d932faf11dcb0c9 (patch)
tree74c1e7d4b004eb26e1cab3b98f515c05ff43f1ff /src
parent6ad0e8d61a3511494dd2fc1c8ffa1ab051ea273c (diff)
Call emuPause before loading a ROM so we don't crash if one is already loaded
Diffstat (limited to 'src')
-rw-r--r--src/frontend/qt_sdl/main.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/frontend/qt_sdl/main.cpp b/src/frontend/qt_sdl/main.cpp
index e2ee89a..1146a84 100644
--- a/src/frontend/qt_sdl/main.cpp
+++ b/src/frontend/qt_sdl/main.cpp
@@ -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());
}