Qt: Return early from setTurbo if possible

This commit is contained in:
Jeffrey Pfau 2015-04-25 15:42:41 -07:00
parent 03c2eb0776
commit 65543bdd69
1 changed files with 4 additions and 0 deletions

View File

@ -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();