Remove unused JoypadSDL::singleton
This commit is contained in:
parent
60638c93fb
commit
1469287ef7
2 changed files with 0 additions and 16 deletions
|
|
@ -43,8 +43,6 @@
|
|||
#include <SDL3/SDL_iostream.h>
|
||||
#include <SDL3/SDL_joystick.h>
|
||||
|
||||
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() {
|
||||
|
|
|
|||
|
|
@ -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 @@ private:
|
|||
SDL_Gamepad *get_sdl_gamepad() const;
|
||||
};
|
||||
|
||||
static JoypadSDL *singleton;
|
||||
|
||||
Joypad joypads[Input::JOYPADS_MAX];
|
||||
HashMap<SDL_JoystickID, int> sdl_instance_id_to_joypad_id;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue