Commit be3b1cff0bc2e3e28ae53beb3cc97ab42e8447ab

Sam Lantinga 2022-12-08T17:03:29

Added logging for SDL_DISPLAYEVENT_MOVED

diff --git a/src/events/SDL_events.c b/src/events/SDL_events.c
index ec1835b..441038e 100644
--- a/src/events/SDL_events.c
+++ b/src/events/SDL_events.c
@@ -247,6 +247,7 @@ static void SDL_LogEvent(const SDL_Event *event)
                 SDL_DISPLAYEVENT_CASE(SDL_DISPLAYEVENT_ORIENTATION);
                 SDL_DISPLAYEVENT_CASE(SDL_DISPLAYEVENT_CONNECTED);
                 SDL_DISPLAYEVENT_CASE(SDL_DISPLAYEVENT_DISCONNECTED);
+                SDL_DISPLAYEVENT_CASE(SDL_DISPLAYEVENT_MOVED);
 #undef SDL_DISPLAYEVENT_CASE
             default:
                 SDL_strlcpy(name2, "UNKNOWN (bug? fixme?)", sizeof(name2));
diff --git a/src/test/SDL_test_common.c b/src/test/SDL_test_common.c
index 75afd5b..73ddd6e 100644
--- a/src/test/SDL_test_common.c
+++ b/src/test/SDL_test_common.c
@@ -1462,6 +1462,10 @@ static void SDLTest_PrintEvent(SDL_Event *event)
             SDL_Log("SDL EVENT: Display %" SDL_PRIu32 " connected",
                     event->display.display);
             break;
+        case SDL_DISPLAYEVENT_MOVED:
+            SDL_Log("SDL EVENT: Display %" SDL_PRIu32 " changed position",
+                    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));