mirror of https://github.com/mgba-emu/mgba.git
Qt: Return early from setTurbo if possible
This commit is contained in:
parent
03c2eb0776
commit
65543bdd69
|
@ -563,6 +563,10 @@ void GameController::setTurbo(bool set, bool forced) {
|
|||
if (m_turboForced && !forced) {
|
||||
return;
|
||||
}
|
||||
if (m_turbo == set && m_turboForced == forced) {
|
||||
// Don't interrupt the thread if we don't need to
|
||||
return;
|
||||
}
|
||||
m_turbo = set;
|
||||
m_turboForced = set && forced;
|
||||
threadInterrupt();
|
||||
|
|
Loading…
Reference in New Issue