summaryrefslogtreecommitdiff
path: root/src/input/joystick.h
diff options
context:
space:
mode:
authorewewukek <ewewukek@gmail.com>2024-01-10 15:57:50 +0300
committerJesusalva Jesusalva <jesusalva@themanaworld.org>2024-02-13 02:22:12 +0000
commita38a1ed6fab0cb16e8c7e340a2230cf58db51d3c (patch)
treec73e08ba0a94e14dad1eba18d6f8fab57ee27ebd /src/input/joystick.h
parent1c3f0b8e325883ae3ccacdb7bf453daf6c133001 (diff)
downloadmv-a38a1ed6fab0cb16e8c7e340a2230cf58db51d3c.tar.gz
mv-a38a1ed6fab0cb16e8c7e340a2230cf58db51d3c.tar.bz2
mv-a38a1ed6fab0cb16e8c7e340a2230cf58db51d3c.tar.xz
mv-a38a1ed6fab0cb16e8c7e340a2230cf58db51d3c.zip
Hotplug support for joysticks
Diffstat (limited to 'src/input/joystick.h')
-rw-r--r--src/input/joystick.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/input/joystick.h b/src/input/joystick.h
index 35c114d82..a3c129950 100644
--- a/src/input/joystick.h
+++ b/src/input/joystick.h
@@ -59,6 +59,11 @@ class Joystick final
static void init();
/**
+ * Detects joysticks and (re)connects.
+ */
+ static void detect();
+
+ /**
* Returns the number of available joysticks.
*/
static int getNumberOfJoysticks() A_WARN_UNUSED
@@ -136,8 +141,6 @@ class Joystick final
void resetRepeat(const int key);
- void reload();
-
protected:
unsigned char mDirection;
@@ -166,6 +169,7 @@ class Joystick final
* Is joystick support enabled.
*/
static bool mEnabled;
+ static bool mInitialized;
static int joystickCount;
void doCalibration();