mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-17 18:28:28 +00:00
Renamed SDL events for clarity
Fixes https://github.com/libsdl-org/SDL/issues/6877
This commit is contained in:
parent
74697bc351
commit
7b50bae524
101 changed files with 1375 additions and 862 deletions
|
@ -101,14 +101,14 @@ int main(int argc, char **argv)
|
|||
SDL_PumpEvents();
|
||||
|
||||
/* Process all currently pending events */
|
||||
while (SDL_PeepEvents(&event, 1, SDL_GETEVENT, SDL_FIRSTEVENT, SDL_LASTEVENT) == 1) {
|
||||
while (SDL_PeepEvents(&event, 1, SDL_GETEVENT, SDL_EVENT_FIRST, SDL_EVENT_LAST) == 1) {
|
||||
switch (event.type) {
|
||||
case SDL_SENSORUPDATE:
|
||||
case SDL_EVENT_SENSOR_UPDATE:
|
||||
HandleSensorEvent(&event.sensor);
|
||||
break;
|
||||
case SDL_MOUSEBUTTONUP:
|
||||
case SDL_KEYUP:
|
||||
case SDL_QUIT:
|
||||
case SDL_EVENT_MOUSE_BUTTONUP:
|
||||
case SDL_EVENT_KEY_UP:
|
||||
case SDL_EVENT_QUIT:
|
||||
done = SDL_TRUE;
|
||||
break;
|
||||
default:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue