Sam Lantinga 5 дней назад
Родитель
Сommit
702f9d94cd
1 измененных файлов с 1 добавлено и 3 удалено
  1. 1 3
      src/video/uikit/SDL_uikitevents.m

+ 1 - 3
src/video/uikit/SDL_uikitevents.m

@@ -47,9 +47,7 @@ static BOOL UIKit_EventPumpEnabled = YES;
     bool wants_observation = (UIKit_EventPumpEnabled || SDL_HasMainCallbacks());
     bool wants_observation = (UIKit_EventPumpEnabled || SDL_HasMainCallbacks());
     if (!wants_observation) {
     if (!wants_observation) {
         // Make sure no windows have active animation callbacks
         // 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;
             wants_observation = true;
         }
         }
     }
     }