From a4f962fd46b5b0b4ed9d5eb1e40a203cc0e5f422 Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Thu, 27 Jun 2024 05:47:50 +0300 Subject: [PATCH] SDL_x11shape.c: fix build if SDL_VIDEO_DRIVER_X11_XSHAPE isn't defined Fixes : https://github.com/libsdl-org/SDL/issues/10128. --- src/video/x11/SDL_x11shape.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/video/x11/SDL_x11shape.c b/src/video/x11/SDL_x11shape.c index 7abe55ab37..0766586b14 100644 --- a/src/video/x11/SDL_x11shape.c +++ b/src/video/x11/SDL_x11shape.c @@ -55,9 +55,10 @@ static Uint8 *GenerateShapeMask(SDL_Surface *shape) int X11_UpdateWindowShape(SDL_VideoDevice *_this, SDL_Window *window, SDL_Surface *shape) { + int result = -1; + #ifdef SDL_VIDEO_DRIVER_X11_XSHAPE SDL_WindowData *windowdata = window->driverdata; - int result = -1; /* Generate a set of spans for the region */ if (shape) {