mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-12 09:25:42 +00:00
Merge commit '413af2f5f1' into main
This commit is contained in:
commit
1a18e9b7c2
1 changed files with 3 additions and 1 deletions
|
|
@ -40,6 +40,8 @@ int SDL_SYS_OpenURL(const char *url)
|
|||
#if USE_POSIX_SPAWN
|
||||
pid_t pid2;
|
||||
const char *args[] = { "xdg-open", url, NULL };
|
||||
/* Clear LD_PRELOAD so Chrome opens correctly when this application is launched by Steam */
|
||||
unsetenv("LD_PRELOAD");
|
||||
if (posix_spawnp(&pid2, args[0], NULL, NULL, (char **)args, environ) == 0) {
|
||||
/* Child process doesn't wait for possibly-blocking grandchild. */
|
||||
_exit(EXIT_SUCCESS);
|
||||
|
|
@ -61,7 +63,7 @@ int SDL_SYS_OpenURL(const char *url)
|
|||
/* Child process doesn't wait for possibly-blocking grandchild. */
|
||||
_exit(EXIT_SUCCESS);
|
||||
}
|
||||
#endif
|
||||
#endif /* USE_POSIX_SPAWN */
|
||||
} else if (pid1 < 0) {
|
||||
return SDL_SetError("fork() failed: %s", strerror(errno));
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue