Commit a3c05d2f34a3333a3e7ab7d0931ac97f23a6f66e

Sam Lantinga 2021-11-23T19:43:01

Added debug output for display connect/disconnect events

diff --git a/src/test/SDL_test_common.c b/src/test/SDL_test_common.c
index 3b6effb..7a8ad9e 100644
--- a/src/test/SDL_test_common.c
+++ b/src/test/SDL_test_common.c
@@ -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);