Unknown controller support

This commit is contained in:
patchzyy
2026-08-26 21:32:22 +02:00
parent edd03f8991
commit 21b57f08a4
6 changed files with 539 additions and 0 deletions
+9
View File
@@ -294,6 +294,15 @@ void process_event(SDL_Event& event) {
});
break;
}
case SDL_EVENT_GAMEPAD_REMAPPED: {
if (input::refresh_controller(event.gdevice.which)) {
g_events.push_back(AuroraEvent{
.type = AURORA_CONTROLLER_ADDED,
.controller = event.gdevice.which,
});
}
break;
}
case SDL_EVENT_GAMEPAD_REMOVED: {
input::remove_controller(event.gdevice.which);
g_events.push_back(AuroraEvent{