1
0
mirror of https://github.com/XProger/OpenLara.git synced 2025-08-01 02:40:43 +02:00

[SDL2] Add missing SDL_QUIT event management and small bracket correction. (#499)

This commit is contained in:
Manuel Alfayate Corchete
2025-02-15 13:20:44 +01:00
committed by GitHub
parent 28ee7ac923
commit 46a753bbee

View File

@@ -345,6 +345,9 @@ void inputUpdate() {
while (SDL_PollEvent(&event) == 1) { // while there are still events to be processed
switch (event.type) {
case SDL_QUIT:
Core::isQuit = true;
case SDL_KEYDOWN: {
int scancode = event.key.keysym.scancode;
InputKey key = codeToInputKey(scancode);
@@ -417,6 +420,7 @@ void inputUpdate() {
case SDL_CONTROLLERDEVICEREMOVED: {
joyRemove(event.cdevice.which);
break;
}
// Joystick reading using the old SDL Joystick interface
case SDL_JOYBUTTONDOWN:
@@ -475,7 +479,6 @@ void inputUpdate() {
}
break;
}
}
}
}
}