all repos — mgba @ 2309898152bffb45ece3ebaa08e13f0dbb83ad6e

mGBA Game Boy Advance Emulator

Qt: Rewind now shows the frame after rewinding
Jeffrey Pfau jeffrey@endrift.com
Sun, 12 Apr 2015 20:22:32 -0700
commit

2309898152bffb45ece3ebaa08e13f0dbb83ad6e

parent

293e0a9c9bcfcea38f91c8668a8e469b99d13828

M src/platform/qt/GameController.cppsrc/platform/qt/GameController.cpp

@@ -395,6 +395,8 @@ } else {

GBARewind(&m_threadContext, states); } threadContinue(); + emit rewound(&m_threadContext); + emit frameAvailable(m_drawContext); } void GameController::keyPressed(int key) {
M src/platform/qt/GameController.hsrc/platform/qt/GameController.h

@@ -85,6 +85,7 @@ void gameUnpaused(GBAThread*);

void gameCrashed(const QString& errorMessage); void gameFailed(); void stateLoaded(GBAThread*); + void rewound(GBAThread*); void unimplementedBiosCall(int); void luminanceValueChanged(int);
M src/platform/qt/Window.cppsrc/platform/qt/Window.cpp

@@ -91,6 +91,7 @@ connect(m_controller, SIGNAL(gameStarted(GBAThread*)), this, SLOT(gameStarted(GBAThread*)));

connect(m_controller, SIGNAL(gameStopped(GBAThread*)), m_display, SLOT(stopDrawing())); connect(m_controller, SIGNAL(gameStopped(GBAThread*)), this, SLOT(gameStopped())); connect(m_controller, SIGNAL(stateLoaded(GBAThread*)), m_display, SLOT(forceDraw())); + connect(m_controller, SIGNAL(rewound(GBAThread*)), m_display, SLOT(forceDraw())); connect(m_controller, SIGNAL(gamePaused(GBAThread*)), m_display, SLOT(pauseDrawing())); #ifndef Q_OS_MAC connect(m_controller, SIGNAL(gamePaused(GBAThread*)), menuBar(), SLOT(show()));