From 415cc64d2f94cb174cc0ad29a9b3f4e196f0a0b1 Mon Sep 17 00:00:00 2001 From: Ethan Lee Date: Sun, 1 Feb 2026 13:54:27 -0500 Subject: [PATCH] gpu: Update comments above CHECK_DEVICE_MAGIC macro --- src/gpu/SDL_gpu.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gpu/SDL_gpu.c b/src/gpu/SDL_gpu.c index 11b0b12100..bea650cd77 100644 --- a/src/gpu/SDL_gpu.c +++ b/src/gpu/SDL_gpu.c @@ -21,7 +21,12 @@ #include "SDL_internal.h" #include "SDL_sysgpu.h" -// FIXME: This could probably use SDL_ObjectValid +/* Normally this macro would use something like SDL_IsObjectValid, but in GPU's + * case we prioritize performance and be more trusting of application behavior + * than, say, SDL_Render, so trust that applications will be careful about + * disposing the device and its resources. + * -flibit + */ #define CHECK_DEVICE_MAGIC(device, retval) \ CHECK_PARAM(device == NULL) { \ SDL_SetError("Invalid GPU device"); \