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

consolidate getting home and data dir into helper functions #2101

Merged
merged 1 commit into from
Dec 23, 2024

Conversation

fabiangreffrath
Copy link
Owner

No description provided.

{
AddIWADDir(env);
}
env = M_HomeDir();
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will behave differently on Windows. What's the closest pendant to HOME on Windows, %USERPROFILE%?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer not to use the profile directory in Windows. “Serious” programs and commercial games use it, but I like simple conservative Doom ports to only create files in the port directory.

I think only GZDoom uses the profile directory in Windows, and one of the popular user questions is how to disable that. They added it because commercial GZDoom based games require it.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just realized that the sole slash is entirely meaningless on Windows as a path string, and that it's thus okay to return it unconditionally as it's about the same as not returning any path string at all.

@fabiangreffrath fabiangreffrath merged commit 395ab83 into master Dec 23, 2024
8 checks passed
@fabiangreffrath fabiangreffrath deleted the homedir branch December 31, 2024 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants