From 8ad99cc3f4dd98f0b73a2ece9323f01099a81e80 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 22 Jun 2014 20:58:13 +0300 Subject: Add profiler lines into some functions. --- src/input/joystick.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/input/joystick.cpp') diff --git a/src/input/joystick.cpp b/src/input/joystick.cpp index 1357bc608..b7d34e6ec 100644 --- a/src/input/joystick.cpp +++ b/src/input/joystick.cpp @@ -159,15 +159,20 @@ void Joystick::setNumber(const int n) void Joystick::logic() { + BLOCK_START("Joystick::logic") // When calibrating, don't bother the outside with our state if (mCalibrating) { doCalibration(); + BLOCK_END("Joystick::logic") return; }; if (!mEnabled || !mCalibrated) + { + BLOCK_END("Joystick::logic") return; + } mDirection = 0; @@ -228,6 +233,7 @@ void Joystick::logic() for (int i = 0; i < mButtonsNumber; i++) mActiveButtons[i] = false; } + BLOCK_END("Joystick::logic") } void Joystick::startCalibration() @@ -345,6 +351,7 @@ bool Joystick::validate() const void Joystick::handleRepeat(const int time) { + BLOCK_START("Joystick::handleRepeat") FOR_EACH (KeyTimeMapIter, it, mKeyTimeMap) { bool repeat(false); @@ -365,6 +372,7 @@ void Joystick::handleRepeat(const int time) } } } + BLOCK_END("Joystick::handleRepeat") } void Joystick::resetRepeat(const int key) -- cgit v1.2.3-70-g09d2