From f8666bcc4d1da29f6fd026183d900d7118755f33 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Mon, 22 Aug 2022 20:34:50 +0200 Subject: [PATCH] fixed compiling with SDL versions before 2.0.14 without SDL_OpenURL() --- src/tools.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/tools.c b/src/tools.c index 1f1a925d..6660e120 100644 --- a/src/tools.c +++ b/src/tools.c @@ -9964,7 +9964,13 @@ void ChangeViewportPropertiesIfNeeded(void) void OpenURL(char *url) { +#if SDL_VERSION_ATLEAST(2,0,14) SDL_OpenURL(url); +#else + Warn("SDL_OpenURL(\"%s\") not supported by SDL %d.%d.%d!", + url, SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL); + Warn("Please upgrade to at least SDL 2.0.14 for URL support!"); +#endif } void OpenURLFromHash(SetupFileHash *hash, int hash_key) -- 2.34.1