SDL
SDL copied to clipboard
zenity dialog: fix data race and reduce number of allocs
Description
dialog/unix: remove /usr/bin/env indirection
SDL process is using posix_spawnp
which already does the path lookup
so additional indirection via env
is unnecessary
dialog/unix: reduce string allocations
Simplifies logic of spawning the zenity process by avoiding allocations of static strings
dialog/unix: stricter typing
Introduce const
where appropriate
dialog/unix: deep copy args to avoid data race
SDL properties passed to the SDL_Zenity_ShowFileDialogWithProperties
may be destroyed/modified immediately upon the function return.
Therefore, we must copy all the strings and structures passed via
pointers; otherwise, the SDL_ZenityFileDialog
thread attempting to
read them will cause data race.
Existing Issue(s)
N/A