testnative: print events with --info event

This commit is contained in:
Sam Lantinga
2024-08-04 08:20:54 -07:00
parent 6f6f4fbfd3
commit ef6521aee7
3 changed files with 34 additions and 3 deletions

View File

@@ -206,6 +206,14 @@ int main(int argc, char *argv[])
while (!done) {
/* Check for events */
while (SDL_PollEvent(&event)) {
if (state->verbose & VERBOSE_EVENT) {
if (((event.type != SDL_EVENT_MOUSE_MOTION) &&
(event.type != SDL_EVENT_FINGER_MOTION)) ||
(state->verbose & VERBOSE_MOTION)) {
SDLTest_PrintEvent(&event);
}
}
switch (event.type) {
case SDL_EVENT_WINDOW_EXPOSED:
SDL_SetRenderDrawColor(renderer, 0xA0, 0xA0, 0xA0, 0xFF);