Added SDL_EVENT_DISPLAY_USABLE_BOUNDS_CHANGED

Fixes https://github.com/libsdl-org/SDL/issues/12785
This commit is contained in:
Sam Lantinga
2025-10-09 15:11:13 -07:00
parent bfc96c92fd
commit 6677fad1c8
10 changed files with 75 additions and 38 deletions

View File

@@ -1626,6 +1626,14 @@ void SDLTest_PrintEvent(const SDL_Event *event)
event->display.displayID, (int)(scale * 100.0f));
}
break;
case SDL_EVENT_DISPLAY_USABLE_BOUNDS_CHANGED:
{
SDL_Rect bounds;
SDL_GetDisplayUsableBounds(event->display.displayID, &bounds);
SDL_Log("SDL EVENT: Display %" SDL_PRIu32 " changed usable bounds to %dx%d at %d,%d",
event->display.displayID, bounds.w, bounds.h, bounds.x, bounds.y);
}
break;
case SDL_EVENT_DISPLAY_DESKTOP_MODE_CHANGED:
SDL_Log("SDL EVENT: Display %" SDL_PRIu32 " desktop mode changed to %" SDL_PRIs32 "x%" SDL_PRIs32,
event->display.displayID, event->display.data1, event->display.data2);