From: Holger Schemel Date: Mon, 22 Aug 2022 18:34:50 +0000 (+0200) Subject: fixed compiling with SDL versions before 2.0.14 without SDL_OpenURL() X-Git-Tag: 4.3.3.0~73 X-Git-Url: https://git.artsoft.org/rocksndiamonds.git/?a=commitdiff_plain;h=f8666bcc4d1da29f6fd026183d900d7118755f33;p=rocksndiamonds.git fixed compiling with SDL versions before 2.0.14 without SDL_OpenURL() --- 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)