Permalink
Browse files
Qt: Allow pausing game at load (fixes mgba.io/i/1129)
- Loading branch information...
Showing
with
12 additions
and
2 deletions.
-
+1
−0
CHANGES
-
+10
−2
src/platform/qt/Window.cpp
-
+1
−0
src/platform/qt/Window.h
|
|
@@ -71,6 +71,7 @@ Misc: |
|
|
- FFmpeg: Support libswresample (fixes mgba.io/i/1120, mgba.io/b/123)
|
|
|
- FFmpeg: Support lossless h.264 encoding
|
|
|
- Feature: Added loading savestates from command line
|
|
|
+ - Qt: Allow pausing game at load (fixes mgba.io/i/1129)
|
|
|
|
|
|
0.6.3: (2017-04-14)
|
|
|
Bugfixes:
|
|
|
|
|
|
@@ -1198,12 +1198,15 @@ void Window::setupMenu(QMenuBar* menubar) { |
|
|
pause->setCheckable(true);
|
|
|
pause->setShortcut(tr("Ctrl+P"));
|
|
|
connect(pause, &QAction::triggered, [this](bool paused) {
|
|
|
- m_controller->setPaused(paused);
|
|
|
+ if (m_controller) {
|
|
|
+ m_controller->setPaused(paused);
|
|
|
+ } else {
|
|
|
+ m_pendingPause = paused;
|
|
|
+ }
|
|
|
});
|
|
|
connect(this, &Window::paused, [pause](bool paused) {
|
|
|
pause->setChecked(paused);
|
|
|
});
|
|
|
- m_gameActions.append(pause);
|
|
|
addControlledAction(emulationMenu, pause, "pause");
|
|
|
|
|
|
QAction* frameAdvance = new QAction(tr("&Next frame"), emulationMenu);
|
|
|
@@ -1924,6 +1927,11 @@ void Window::setController(CoreController* controller, const QString& fname) { |
|
|
m_controller->loadState(m_pendingState);
|
|
|
m_pendingState = QString();
|
|
|
}
|
|
|
+
|
|
|
+ if (m_pendingPause) {
|
|
|
+ m_controller->setPaused(true);
|
|
|
+ m_pendingPause = false;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
WindowBackground::WindowBackground(QWidget* parent)
|
|
|
|
|
|
@@ -207,6 +207,7 @@ private slots: |
|
|
bool m_wasOpened = false;
|
|
|
QString m_pendingPatch;
|
|
|
QString m_pendingState;
|
|
|
+ bool m_pendingPause = false;
|
|
|
|
|
|
bool m_hitUnimplementedBiosCall;
|
|
|
|
|
|
|
0 comments on commit
2f5624e