mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-06-04 19:07:40 +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
|
@ -63,7 +63,7 @@ void loop()
|
|||
while (SDL_PollEvent(&e)) {
|
||||
|
||||
/* Re-create when window has been resized */
|
||||
if (e.type == SDL_WINDOWEVENT_SIZE_CHANGED) {
|
||||
if (e.type == SDL_EVENT_WINDOW_SIZE_CHANGED) {
|
||||
|
||||
SDL_DestroyRenderer(renderer);
|
||||
|
||||
|
@ -74,7 +74,7 @@ void loop()
|
|||
SDL_RenderClear(renderer);
|
||||
}
|
||||
|
||||
if (e.type == SDL_QUIT) {
|
||||
if (e.type == SDL_EVENT_QUIT) {
|
||||
done = 1;
|
||||
#ifdef __EMSCRIPTEN__
|
||||
emscripten_cancel_main_loop();
|
||||
|
@ -82,7 +82,7 @@ void loop()
|
|||
return;
|
||||
}
|
||||
|
||||
if ((e.type == SDL_KEYDOWN) && (e.key.keysym.sym == SDLK_ESCAPE)) {
|
||||
if ((e.type == SDL_EVENT_KEY_DOWN) && (e.key.keysym.sym == SDLK_ESCAPE)) {
|
||||
done = 1;
|
||||
#ifdef __EMSCRIPTEN__
|
||||
emscripten_cancel_main_loop();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue