SDL: metal: Fix inverted return value in METAL_QueryFence

From b340ddcd7b44511f7b49005ba4a91a3c9907f77e Mon Sep 17 00:00:00 2001
From: xentripetal <[EMAIL REDACTED]>
Date: Fri, 7 Aug 2026 22:04:35 -0500
Subject: [PATCH] metal: Fix inverted return value in METAL_QueryFence

SDL_QueryGPUFence is documented to return true when the fence is signaled (complete). Since 514b26e it returns METAL_INTERNAL_IsFenceBusy directly, so it returns true when the fence is still busy, breaking usage of SDL_AcquireGPUSwapchainTexture.
---
 src/gpu/metal/SDL_gpu_metal.m | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gpu/metal/SDL_gpu_metal.m b/src/gpu/metal/SDL_gpu_metal.m
index b32322246440b..583e9f4a0ece7 100644
--- a/src/gpu/metal/SDL_gpu_metal.m
+++ b/src/gpu/metal/SDL_gpu_metal.m
@@ -3633,7 +3633,7 @@ static bool METAL_QueryFence(
     SDL_GPUFence *fence)
 {
     MetalFence *metalFence = (MetalFence *)fence;
-    return METAL_INTERNAL_IsFenceBusy(metalFence);
+    return !METAL_INTERNAL_IsFenceBusy(metalFence);
 }
 
 // Window and Swapchain Management