From dec7875a6e23212021e4d9080330a42832dfe02a Mon Sep 17 00:00:00 2001
From: Edward Rudd <urkle@outoforder.cc>
Date: Tue, 15 Jun 2021 01:40:19 +0000
Subject: [PATCH] update SDL soruce to 2.0.14
---
source/src/video/uikit/SDL_uikitwindow.m | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/source/src/video/uikit/SDL_uikitwindow.m b/source/src/video/uikit/SDL_uikitwindow.m
index 9a9f4af..41b6e40 100644
--- a/source/src/video/uikit/SDL_uikitwindow.m
+++ b/source/src/video/uikit/SDL_uikitwindow.m
@@ -25,7 +25,6 @@
#include "SDL_syswm.h"
#include "SDL_video.h"
#include "SDL_mouse.h"
-#include "SDL_assert.h"
#include "SDL_hints.h"
#include "../SDL_sysvideo.h"
#include "../SDL_pixels_c.h"
@@ -162,14 +161,14 @@
@autoreleasepool {
SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window);
SDL_DisplayData *data = (__bridge SDL_DisplayData *) display->driverdata;
-
- /* SDL currently puts this window at the start of display's linked list. We rely on this. */
- SDL_assert(_this->windows == window);
+ SDL_Window *other;
/* We currently only handle a single window per display on iOS */
- if (window->next != NULL) {
- return SDL_SetError("Only one window allowed per display.");
- }
+ for (other = _this->windows; other; other = other->next) {
+ if (other != window && SDL_GetDisplayForWindow(other) == display) {
+ return SDL_SetError("Only one window allowed per display.");
+ }
+ }
/* If monitor has a resolution of 0x0 (hasn't been explicitly set by the
* user, so it's in standby), try to force the display to a resolution
--
Gitblit v1.9.3