Qt: Restore reconfiguring rewind

This commit is contained in:
Jeffrey Pfau 2016-09-11 00:51:50 -07:00
parent f34f45257a
commit d8c773bbf7
1 changed files with 10 additions and 3 deletions

View File

@ -659,10 +659,14 @@ void GameController::frameAdvance() {
void GameController::setRewind(bool enable, int capacity) {
if (m_gameOpen) {
threadInterrupt();
// TODO: Put back rewind
if (m_threadContext.core->opts.rewindEnable) {
mCoreRewindContextDeinit(&m_threadContext.rewind);
}
m_threadContext.core->opts.rewindEnable = enable;
if (enable) {
mCoreRewindContextInit(&m_threadContext.rewind, capacity);
}
threadContinue();
} else {
// TODO: Put back rewind
}
}
@ -685,6 +689,9 @@ void GameController::startRewinding() {
if (!isLoaded()) {
return;
}
if (!m_threadContext.core->opts.rewindEnable) {
return;
}
if (m_multiplayer && m_multiplayer->attached() > 1) {
return;
}