merdes varies

This commit is contained in:
2025-08-08 21:06:28 +02:00
parent 98f34c0a09
commit 0fc83cf9c1
11 changed files with 34 additions and 26 deletions

View File

@@ -308,15 +308,16 @@ void Input::update() {
}
}
void Input::handleEvent(const SDL_Event &event) {
auto Input::handleEvent(const SDL_Event &event) -> bool {
switch (event.type) {
case SDL_EVENT_GAMEPAD_ADDED:
addGamepad(event.gdevice.which);
break;
return true;
case SDL_EVENT_GAMEPAD_REMOVED:
removeGamepad(event.gdevice.which);
break;
return true;
}
return false;
}
void Input::addGamepad(int device_index) {