Skip to content

Commit

Permalink
Added debug output for display connect/disconnect events
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Nov 23, 2021
1 parent b7f9c20 commit a3c05d2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/test/SDL_test_common.c
Expand Up @@ -1473,10 +1473,18 @@ SDLTest_PrintEvent(SDL_Event * event)
switch (event->type) {
case SDL_DISPLAYEVENT:
switch (event->display.event) {
case SDL_DISPLAYEVENT_CONNECTED:
SDL_Log("SDL EVENT: Display %" SDL_PRIu32 " connected",
event->display.display);
break;
case SDL_DISPLAYEVENT_ORIENTATION:
SDL_Log("SDL EVENT: Display %" SDL_PRIu32 " changed orientation to %s",
event->display.display, DisplayOrientationName(event->display.data1));
break;
case SDL_DISPLAYEVENT_DISCONNECTED:
SDL_Log("SDL EVENT: Display %" SDL_PRIu32 " disconnected",
event->display.display);
break;
default:
SDL_Log("SDL EVENT: Display %" SDL_PRIu32 " got unknown event 0x%4.4x",
event->display.display, event->display.event);
Expand Down

0 comments on commit a3c05d2

Please sign in to comment.