From 586a81c7d6e02ceb5cab10e5356a8a1ff3253eda Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Tue, 22 Dec 2020 08:40:39 +0200 Subject: App: Attempt to open URLs using SDL first SDL_OpenURL() was added in 2.0.14. --- src/app.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/app.c') diff --git a/src/app.c b/src/app.c index 4ea37cd4..e1b981d8 100644 --- a/src/app.c +++ b/src/app.c @@ -54,6 +54,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include +#include +#include #include #include @@ -1437,6 +1439,11 @@ iBool handleCommand_App(const char *cmd) { } void openInDefaultBrowser_App(const iString *url) { +#if SDL_VERSION_ATLEAST(2, 0, 14) + if (SDL_OpenURL(cstr_String(url)) == 0) { + return; + } +#endif iProcess *proc = new_Process(); setArguments_Process(proc, #if defined (iPlatformApple) -- cgit v1.2.3