From a38a1ed6fab0cb16e8c7e340a2230cf58db51d3c Mon Sep 17 00:00:00 2001 From: ewewukek Date: Wed, 10 Jan 2024 15:57:50 +0300 Subject: Hotplug support for joysticks --- src/input/joystick.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/input/joystick.h') 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 @@ -58,6 +58,11 @@ class Joystick final */ static void init(); + /** + * Detects joysticks and (re)connects. + */ + static void detect(); + /** * Returns the number of available joysticks. */ @@ -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(); -- cgit v1.2.3-70-g09d2