mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-17 23:31:45 +00:00
testhotplug+testmouse: exit when pressing ESC key
This commit is contained in:
@@ -213,6 +213,10 @@ static void loop(void *arg)
|
||||
break;
|
||||
|
||||
case SDL_EVENT_KEY_DOWN:
|
||||
if (event.key.scancode == SDL_SCANCODE_ESCAPE) {
|
||||
loop_data->done = true;
|
||||
break;
|
||||
}
|
||||
if (event.key.key == SDLK_C) {
|
||||
int x, y, w, h;
|
||||
SDL_GetWindowPosition(window, &x, &y);
|
||||
|
Reference in New Issue
Block a user