Skip to content

armgit / godot

Public Imported from GitHub
0

Godot Engine – Multi-platform 2D and 3D game engine

SDL: fix linker error for iOS platforms

Stuart Carnie00e2ec7f64f2
diff --git a/thirdparty/README.md b/thirdparty/README.md
index d597fbd7000..84fac8bc15b 100644
--- a/thirdparty/README.md
+++ b/thirdparty/README.md
@@ -1036,6 +1036,7 @@ Patches:
- `0006-fix-cs-environ.patch` ([GH-109283](https://github.com/godotengine/godot/pull/109283))
- `0007-ios-accelerometer.patch` ([GH-120373](https://github.com/godotengine/godot/pull/120373))
- `0008-ios-link.patch` ([GH-123903](https://github.com/godotengine/godot/pull/123903))
+- `0009-ios-iostream-no-prefpath.patch` ([GH-123899](https://github.com/godotengine/godot/pull/123899))
## spirv-cross
diff --git a/thirdparty/sdl/io/SDL_iostream.c b/thirdparty/sdl/io/SDL_iostream.c
index 31c74ab5034..75c4c69a06e 100644
--- a/thirdparty/sdl/io/SDL_iostream.c
+++ b/thirdparty/sdl/io/SDL_iostream.c
@@ -956,7 +956,7 @@ SDL_IOStream *SDL_IOFromFile(const char *file, const char *mode)
}
}
-#elif defined(SDL_PLATFORM_IOS)
+#elif defined(SDL_PLATFORM_IOS) && !defined(SDL_FILESYSTEM_DUMMY)
// Try to open the file on the filesystem first
FILE *fp = NULL;
diff --git a/thirdparty/sdl/patches/0009-ios-iostream-no-prefpath.patch b/thirdparty/sdl/patches/0009-ios-iostream-no-prefpath.patch
new file mode 100644
index 00000000000..d7dfa0c9d0a
--- /dev/null
+++ b/thirdparty/sdl/patches/0009-ios-iostream-no-prefpath.patch
@@ -0,0 +1,13 @@
+diff --git a/thirdparty/sdl/io/SDL_iostream.c b/thirdparty/sdl/io/SDL_iostream.c
+index 31c74ab503..75c4c69a06 100644
+--- a/thirdparty/sdl/io/SDL_iostream.c
++++ b/thirdparty/sdl/io/SDL_iostream.c
+@@ -956,7 +956,7 @@ SDL_IOStream *SDL_IOFromFile(const char *file, const char *mode)
+ }
+ }
+
+-#elif defined(SDL_PLATFORM_IOS)
++#elif defined(SDL_PLATFORM_IOS) && !defined(SDL_FILESYSTEM_DUMMY)
+
+ // Try to open the file on the filesystem first
+ FILE *fp = NULL;