Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Look for disk image in directory of executable #24

Closed
laanwj opened this issue Jan 30, 2023 · 1 comment
Closed

Look for disk image in directory of executable #24

laanwj opened this issue Jan 30, 2023 · 1 comment

Comments

@laanwj
Copy link
Owner

laanwj commented Jan 30, 2023

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.

@laanwj
Copy link
Owner Author

laanwj commented Jan 30, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant