diff --git a/UI/GamepadEmu.cpp b/UI/GamepadEmu.cpp index 6b39123bfb..7b355040bd 100644 --- a/UI/GamepadEmu.cpp +++ b/UI/GamepadEmu.cpp @@ -34,6 +34,10 @@ static u32 GetButtonColor() { return g_Config.iTouchButtonStyle == 1 ? 0xFFFFFF : 0xc0b080; } +GamepadView::GamepadView(UI::LayoutParams *layoutParams) : UI::View(layoutParams), secondsWithoutTouch_(0) { + lastFrameTime_ = time_now_d(); +} + void GamepadView::Touch(const TouchInput &input) { secondsWithoutTouch_ = 0.0f; } diff --git a/UI/GamepadEmu.h b/UI/GamepadEmu.h index fb600fc8fa..eaebd5e9c8 100644 --- a/UI/GamepadEmu.h +++ b/UI/GamepadEmu.h @@ -25,8 +25,7 @@ class GamepadView : public UI::View { public: - GamepadView(UI::LayoutParams *layoutParams) : UI::View(layoutParams), lastFrameTime_(0.0f), secondsWithoutTouch_(0) { - } + GamepadView(UI::LayoutParams *layoutParams); void Touch(const TouchInput &input) override; bool Key(const KeyInput &input) override {