Corrected issue with OpenURL()
It was not working on Windows 10
This commit is contained in:
parent
b3568e6d15
commit
75298b50fb
@ -1917,14 +1917,13 @@ void OpenURL(const char *url)
|
|||||||
char *cmd = (char *)calloc(strlen(url) + 10, sizeof(char));
|
char *cmd = (char *)calloc(strlen(url) + 10, sizeof(char));
|
||||||
|
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
sprintf(cmd, "explorer '%s'", url);
|
sprintf(cmd, "explorer %s", url);
|
||||||
#elif defined(__linux__)
|
#elif defined(__linux__)
|
||||||
sprintf(cmd, "xdg-open '%s'", url); // Alternatives: firefox, x-www-browser
|
sprintf(cmd, "xdg-open '%s'", url); // Alternatives: firefox, x-www-browser
|
||||||
#elif defined(__APPLE__)
|
#elif defined(__APPLE__)
|
||||||
sprintf(cmd, "open '%s'", url);
|
sprintf(cmd, "open '%s'", url);
|
||||||
#endif
|
#endif
|
||||||
system(cmd);
|
system(cmd);
|
||||||
|
|
||||||
free(cmd);
|
free(cmd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user