mirror of https://github.com/mgba-emu/mgba.git
Qt: Add status message for rewinding being disabled
This commit is contained in:
parent
4312ce14ff
commit
5d6349338a
|
@ -500,6 +500,9 @@ void CoreController::showResetInfo(bool enable) {
|
||||||
|
|
||||||
void CoreController::setRewinding(bool rewind) {
|
void CoreController::setRewinding(bool rewind) {
|
||||||
if (!m_threadContext.core->opts.rewindEnable) {
|
if (!m_threadContext.core->opts.rewindEnable) {
|
||||||
|
if (rewind) {
|
||||||
|
emit statusPosted(tr("Rewinding not currently enabled"));
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (rewind && m_multiplayer && m_multiplayer->attached() > 1) {
|
if (rewind && m_multiplayer && m_multiplayer->attached() > 1) {
|
||||||
|
@ -514,17 +517,22 @@ void CoreController::setRewinding(bool rewind) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void CoreController::rewind(int states) {
|
void CoreController::rewind(int states) {
|
||||||
{
|
if (!states) {
|
||||||
Interrupter interrupter(this);
|
return;
|
||||||
if (!states) {
|
}
|
||||||
states = INT_MAX;
|
if (!m_threadContext.core->opts.rewindEnable) {
|
||||||
}
|
emit statusPosted(tr("Rewinding not currently enabled"));
|
||||||
for (int i = 0; i < states; ++i) {
|
}
|
||||||
if (!mCoreRewindRestore(&m_threadContext.impl->rewind, m_threadContext.core)) {
|
Interrupter interrupter(this);
|
||||||
break;
|
if (!states) {
|
||||||
}
|
states = INT_MAX;
|
||||||
|
}
|
||||||
|
for (int i = 0; i < states; ++i) {
|
||||||
|
if (!mCoreRewindRestore(&m_threadContext.impl->rewind, m_threadContext.core)) {
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
interrupter.resume();
|
||||||
emit frameAvailable();
|
emit frameAvailable();
|
||||||
emit rewound();
|
emit rewound();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue