all repos — mgba @ 65543bdd69d97d4d8e9da098f2661cfc09191fc7

mGBA Game Boy Advance Emulator

Qt: Return early from setTurbo if possible
Jeffrey Pfau jeffrey@endrift.com
Sat, 25 Apr 2015 15:42:41 -0700
commit

65543bdd69d97d4d8e9da098f2661cfc09191fc7

parent

03c2eb077618ddae1e81e4a23f96f84551f10dcd

1 files changed, 4 insertions(+), 0 deletions(-)

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

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