Added logging for SDL_DISPLAYEVENT_MOVED

This commit is contained in:
Sam Lantinga 2022-12-08 17:03:29 -08:00
parent ab479b4961
commit be3b1cff0b
2 changed files with 5 additions and 0 deletions

View file

@ -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));

View file

@ -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));