From d359180040452d94dec78c32c58e826d6ce67f15 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Tue, 3 Jan 2017 00:44:05 -0800 Subject: [PATCH] Fixed bug 3519 - SDL_GetDisplayMode fails to report mode.format when using Wayland backend Ryan C. Gordon Kristian says you can't do it with Wayland, and that going forward, it'll just handle whatever you throw at it anyhow. https://twitter.com/hoegsberg/status/816148272402165761 So I say we mark it SDL_PIXELFORMAT_RGB888, which is what my X11 display currently reports, and leave it at that. --- src/video/wayland/SDL_waylandvideo.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/video/wayland/SDL_waylandvideo.c b/src/video/wayland/SDL_waylandvideo.c index a1b85acb1..500aa2401 100644 --- a/src/video/wayland/SDL_waylandvideo.c +++ b/src/video/wayland/SDL_waylandvideo.c @@ -221,6 +221,7 @@ display_handle_mode(void *data, SDL_DisplayMode mode; SDL_zero(mode); + mode.format = SDL_PIXELFORMAT_RGB888; mode.w = width; mode.h = height; mode.refresh_rate = refresh / 1000; // mHz to Hz