SDL: Use SDL_HasWindows()

From 702f9d94cd878751add81bf7035bc3144caa950d Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Wed, 6 May 2026 09:12:03 -0700
Subject: [PATCH] Use SDL_HasWindows()

---
 src/video/uikit/SDL_uikitevents.m | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/video/uikit/SDL_uikitevents.m b/src/video/uikit/SDL_uikitevents.m
index fef6683dbf18b..4f9de24af2936 100644
--- a/src/video/uikit/SDL_uikitevents.m
+++ b/src/video/uikit/SDL_uikitevents.m
@@ -47,9 +47,7 @@ - (void)update
     bool wants_observation = (UIKit_EventPumpEnabled || SDL_HasMainCallbacks());
     if (!wants_observation) {
         // Make sure no windows have active animation callbacks
-        int num_windows = 0;
-        SDL_free(SDL_GetWindows(&num_windows));
-        if (num_windows > 0) {
+        if (SDL_HasWindows()) {
             wants_observation = true;
         }
     }