diff mbox series

[RFC,5/6] ui/sdl: load cursor in RGBA8888 format not BGRA8888

Message ID 20250123191536.142753-6-berrange@redhat.com (mailing list archive)
State New
Headers show
Series RFC: hw/display/virtio-gpu: problems with coloured cursors | expand

Commit Message

Daniel P. Berrangé Jan. 23, 2025, 7:15 p.m. UTC
The SDL code was loading cursor data in BGRA8888 format which masked the
problem with virtio-gpu not supplying data in RGBA8888 format. Now that
virtio-gpu is fixed, the SDL code needs to be fixed to match.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 ui/sdl2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/ui/sdl2.c b/ui/sdl2.c
index 445eb1dd9f..2d56b4d174 100644
--- a/ui/sdl2.c
+++ b/ui/sdl2.c
@@ -772,7 +772,7 @@  static void sdl_mouse_define(DisplayChangeListener *dcl,
 
     guest_sprite_surface =
         SDL_CreateRGBSurfaceFrom(c->data, c->width, c->height, 32, c->width * 4,
-                                 0xff0000, 0x00ff00, 0xff, 0xff000000);
+                                 0xff, 0x00ff00, 0xff0000, 0xff000000);
 
     if (!guest_sprite_surface) {
         fprintf(stderr, "Failed to make rgb surface from %p\n", c);