From 6afcd6a3f34b1ffd3603d627da6dd51bf641fd45 Mon Sep 17 00:00:00 2001 From: ergo720 <45463469+ergo720@users.noreply.github.com> Date: Sat, 19 Sep 2020 20:33:59 +0200 Subject: [PATCH] Removed IsDetectable(), it's no longer necessary --- src/common/input/InputDevice.h | 1 - src/common/input/InputWindow.cpp | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/common/input/InputDevice.h b/src/common/input/InputDevice.h index 75d2d8210..b8465fe5e 100644 --- a/src/common/input/InputDevice.h +++ b/src/common/input/InputDevice.h @@ -89,7 +89,6 @@ public: { public: virtual ControlState GetState() const = 0; - virtual bool IsDetectable() { return true; } }; class Output : public IoControl diff --git a/src/common/input/InputWindow.cpp b/src/common/input/InputWindow.cpp index 6d390c440..3975403c6 100644 --- a/src/common/input/InputWindow.cpp +++ b/src/common/input/InputWindow.cpp @@ -186,7 +186,7 @@ InputDevice::Input* InputWindow::DetectInput(InputDevice* const Device, int ms) Device->UpdateInput(); std::vector::iterator state = initial_states.begin(); for (; i != e && s == e; i++, state++) { - if ((*i)->IsDetectable() && (*i)->GetState() > INPUT_DETECT_THRESHOLD) { + if ((*i)->GetState() > INPUT_DETECT_THRESHOLD) { if (*state == false) { // input was not initially pressed or it was but released afterwards s = i;