From de6595bda635e3d180278625b04b6fc30059daea Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Wed, 17 Jul 2024 13:35:18 -0700 Subject: [PATCH] SDL_MUSTLOCK() should return true if the surface needs locking even if it's currently locked. There's a bunch of code that assumes this in SDL, and presumably in applications as well. --- include/SDL3/SDL_surface.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/SDL3/SDL_surface.h b/include/SDL3/SDL_surface.h index 32cb75c388..2ec66c5639 100644 --- a/include/SDL3/SDL_surface.h +++ b/include/SDL3/SDL_surface.h @@ -61,7 +61,7 @@ typedef Uint32 SDL_SurfaceFlags; * * \since This macro is available since SDL 3.0.0. */ -#define SDL_MUSTLOCK(S) (((S)->flags & (SDL_SURFACE_LOCK_NEEDED | SDL_SURFACE_LOCKED)) == SDL_SURFACE_LOCK_NEEDED) +#define SDL_MUSTLOCK(S) ((((S)->flags & SDL_SURFACE_LOCK_NEEDED)) == SDL_SURFACE_LOCK_NEEDED) /** * The scaling mode.