Multiple controllers: Select active controller and set default controller (#3169)

* initial commit - not cleanup yet, not usable with imGUI

* Ugly solution to working with ImGUI

* Populate the default controller labels

* Add remove default button

* missing tr calls

* edit imgui flag after updating

* Refactor

* Update sirit
This commit is contained in:
rainmakerv2
2025-07-31 02:37:45 +08:00
committed by GitHub
parent 35132d9fdc
commit c924c20575
10 changed files with 515 additions and 255 deletions

View File

@@ -9,6 +9,7 @@
#include "string"
#define SDL_EVENT_TOGGLE_FULLSCREEN (SDL_EVENT_USER + 1)
#define SDL_EVENT_TOGGLE_PAUSE (SDL_EVENT_USER + 2)
#define SDL_EVENT_CHANGE_CONTROLLER (SDL_EVENT_USER + 3)
struct SDL_Window;
struct SDL_Gamepad;
@@ -27,8 +28,6 @@ public:
State ReadState() override;
private:
SDL_Gamepad* m_gamepad = nullptr;
float m_gyro_poll_rate = 0.0f;
float m_accel_poll_rate = 0.0f;
};