From 65543bdd69d97d4d8e9da098f2661cfc09191fc7 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Sat, 25 Apr 2015 15:42:41 -0700 Subject: [PATCH] Qt: Return early from setTurbo if possible --- src/platform/qt/GameController.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/platform/qt/GameController.cpp b/src/platform/qt/GameController.cpp index ac8dda699..4d34ddf0d 100644 --- a/src/platform/qt/GameController.cpp +++ b/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();