mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-28 03:26:15 +08:00
testspriteminimal: only quit when escape is pressed
This commit is contained in:
@@ -93,7 +93,8 @@ static void loop(void)
|
|||||||
|
|
||||||
/* Check for events */
|
/* Check for events */
|
||||||
while (SDL_PollEvent(&event)) {
|
while (SDL_PollEvent(&event)) {
|
||||||
if (event.type == SDL_EVENT_QUIT || event.type == SDL_EVENT_KEY_DOWN) {
|
if (event.type == SDL_EVENT_QUIT ||
|
||||||
|
(event.type == SDL_EVENT_KEY_DOWN && event.key.key == SDLK_ESCAPE)) {
|
||||||
done = 1;
|
done = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user