From f6377ae259b98f2f58350819abec5c988525de59 Mon Sep 17 00:00:00 2001 From: Clownacy Date: Tue, 7 Apr 2020 13:53:45 +0100 Subject: [PATCH] Fix SDL2 cursor --- src/Backends/SDL2/Misc.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Backends/SDL2/Misc.cpp b/src/Backends/SDL2/Misc.cpp index d6da3196..3d22738c 100644 --- a/src/Backends/SDL2/Misc.cpp +++ b/src/Backends/SDL2/Misc.cpp @@ -96,6 +96,8 @@ void Backend_SetCursor(const unsigned char *rgb_pixels, unsigned int width, unsi if (cursor_surface_pixels != NULL) { + memcpy(cursor_surface_pixels, rgb_pixels, width * height * 3); + cursor_surface = SDL_CreateRGBSurfaceWithFormatFrom(cursor_surface_pixels, width, height, 0, width * 3, SDL_PIXELFORMAT_RGB24); if (cursor_surface != NULL)