Qt: Return early from setTurbo if possible
Jeffrey Pfau jeffrey@endrift.com
Sat, 25 Apr 2015 15:42:41 -0700
1 files changed,
4 insertions(+),
0 deletions(-)
M
src/platform/qt/GameController.cpp
→
src/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();