testhotplug+testmouse: exit when pressing ESC key

This commit is contained in:
Anonymous Maarten committed 2025-07-03 02:21:51 +02:00
1 parent 03489e249a
commit f3bf387caf
2 files changed
+9

No files matched your search

+4
View File
@@ -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);