From cffad94b9b2fb7498db48ced40c5a3c3f897730e Mon Sep 17 00:00:00 2001 From: Susko3 Date: Sun, 14 Jul 2024 15:49:53 +0200 Subject: [PATCH] Avoid casting --- SDL3-CS/SDL3/SDL_surface.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SDL3-CS/SDL3/SDL_surface.cs b/SDL3-CS/SDL3/SDL_surface.cs index f401788..de954ba 100644 --- a/SDL3-CS/SDL3/SDL_surface.cs +++ b/SDL3-CS/SDL3/SDL_surface.cs @@ -18,6 +18,6 @@ namespace SDL public static partial class SDL3 { [Macro] - public static unsafe bool SDL_MUSTLOCK(SDL_Surface* S) => ((uint)S->flags & (SDL_SURFACE_LOCK_NEEDED | SDL_SURFACE_LOCKED)) == SDL_SURFACE_LOCK_NEEDED; + public static unsafe bool SDL_MUSTLOCK(SDL_Surface* S) => (S->flags & (SDL_SurfaceFlags.SDL_SURFACE_LOCK_NEEDED | SDL_SurfaceFlags.SDL_SURFACE_LOCKED)) == SDL_SurfaceFlags.SDL_SURFACE_LOCK_NEEDED; } }