diff --git a/drivers/sdl/joypad_sdl.cpp b/drivers/sdl/joypad_sdl.cpp index cc2da8aa6a57..4ecc5db2c98a 100644 --- a/drivers/sdl/joypad_sdl.cpp +++ b/drivers/sdl/joypad_sdl.cpp @@ -43,8 +43,6 @@ #include #include -JoypadSDL *JoypadSDL::singleton = nullptr; - // Macro to skip the SDL joystick event handling if the device is an SDL gamepad, because // there are separate events for SDL gamepads #define SKIP_EVENT_FOR_GAMEPAD \ @@ -52,10 +50,6 @@ JoypadSDL *JoypadSDL::singleton = nullptr; continue; \ } -JoypadSDL::JoypadSDL() { - singleton = this; -} - JoypadSDL::~JoypadSDL() { // Process any remaining input events process_events(); @@ -65,11 +59,6 @@ JoypadSDL::~JoypadSDL() { } } SDL_Quit(); - singleton = nullptr; -} - -JoypadSDL *JoypadSDL::get_singleton() { - return singleton; } Error JoypadSDL::initialize() { diff --git a/drivers/sdl/joypad_sdl.h b/drivers/sdl/joypad_sdl.h index c3919611fcd1..0b16900e8956 100644 --- a/drivers/sdl/joypad_sdl.h +++ b/drivers/sdl/joypad_sdl.h @@ -39,11 +39,8 @@ typedef struct SDL_Gamepad SDL_Gamepad; class JoypadSDL { public: - JoypadSDL(); ~JoypadSDL(); - static JoypadSDL *get_singleton(); - Error initialize(); void process_events(); @@ -69,8 +66,6 @@ class JoypadSDL { SDL_Gamepad *get_sdl_gamepad() const; }; - static JoypadSDL *singleton; - Joypad joypads[Input::JOYPADS_MAX]; HashMap sdl_instance_id_to_joypad_id;