Look for disk image in directory of executable
laanwj opened this issue · comments
At least on Windows, it's cumbersome to pass command line parameters. It would be nice to be able to drop it in the same directory as the .exe
an its DLLs, and just work.
I'd propose looking for (say) sundog.st
in SDL_GetBasePath()
when no image filename is passed explicitly.
In Linux and MacOS this is likely not too useful. On Linux a automatic mechanism for locating game data usually works relative to an install paths that is built into the executable (something like /usr/share/games/sundog
), or maybe there's some XDG convention.
I've added a function sundog_autolocate_image
to locate the image automatically. For now, it only implements the former. It could be extended to look in other places later, depending on OS.