video: Expose HDR metadata per-window

Moves the HDR properties from the display to be per-window, and adds the frog_color protocol to enable HDR under Wayland.
This commit is contained in:
Frank Praznik 2024-06-17 19:23:10 -04:00
parent 0383333b54
commit 2f276a2eea
18 changed files with 526 additions and 104 deletions

View file

@ -1576,12 +1576,6 @@ static void SDLTest_PrintEvent(const SDL_Event *event)
event->display.displayID, (int)(scale * 100.0f));
}
break;
case SDL_EVENT_DISPLAY_HDR_STATE_CHANGED:
{
SDL_Log("SDL EVENT: Display %" SDL_PRIu32 " HDR %s",
event->display.displayID, event->display.data1 ? "enabled" : "disabled");
}
break;
case SDL_EVENT_DISPLAY_MOVED:
SDL_Log("SDL EVENT: Display %" SDL_PRIu32 " changed position",
event->display.displayID);
@ -1668,6 +1662,9 @@ static void SDLTest_PrintEvent(const SDL_Event *event)
case SDL_EVENT_WINDOW_DESTROYED:
SDL_Log("SDL EVENT: Window %" SDL_PRIu32 " destroyed", event->window.windowID);
break;
case SDL_EVENT_WINDOW_HDR_STATE_CHANGED:
SDL_Log("SDL EVENT: Window %" SDL_PRIu32 " HDR %s", event->window.windowID, event->window.data1 ? "enabled" : "disabled");
break;
case SDL_EVENT_KEYBOARD_ADDED:
SDL_Log("SDL EVENT: Keyboard %" SDL_PRIu32 " attached",
event->kdevice.which);