mirror of https://github.com/mgba-emu/mgba.git
Qt: Allow pausing game at load (fixes mgba.io/i/1129)
This commit is contained in:
parent
4f246827a6
commit
2f5624e74a
1
CHANGES
1
CHANGES
|
@ -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:
|
|||
bool m_wasOpened = false;
|
||||
QString m_pendingPatch;
|
||||
QString m_pendingState;
|
||||
bool m_pendingPause = false;
|
||||
|
||||
bool m_hitUnimplementedBiosCall;
|
||||
|
||||
|
|
Loading…
Reference in New Issue