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

Non-Steam: Disable Steam AppID file #946

Merged
merged 7 commits into from
Oct 21, 2023
Merged

Conversation

sonic2kk
Copy link
Owner

@sonic2kk sonic2kk commented Oct 21, 2023

Will resolve most of #941.

This PR adds a function to check if we have a Non-Steam Game, and uses this in checkSteamAppIDFile. If we have a Non-Steam Game, we won't run the code to generate the steam_appid.txt file and we will turn the option off in the config file. This is useful for users who have this option on by default, as for Non-Steam Games only this will be ignored, so it is safe for them to keep it on by default.

Steam uses steam_appid.txt if it is in the same folder as the game exe to set its SteamAppId variable for Non-Steam Games, and when this is set via this file for Non-Steam Games, we get a crash if this value is defined and not 0. This check is done before STL even has a chance to run, so we can't fix it from our side. Instead, we can only prevent the code that creates this file from running when we have a Non-Steam Game. Any user who has this file in their game dir currently will have to manually remove it.

In future, this function could be used to set ISGAME=4, but then we'd need to determine if the game is Windows or not, so probably ISGAME=4 and ISGAME=5. For now, though, this PR is sufficient.


TODO:

  • Update langfiles

Steam uses this to set its SteamAppId variable, and when this is set
via this file for Non-Steam Games, we get a crash.
@sonic2kk
Copy link
Owner Author

Langfiles updates, version bumped, some other minor todo cleanup I did in this PR for giggles, and shellcheck is green. Ready to merge!

@sonic2kk sonic2kk merged commit 93260a8 into master Oct 21, 2023
@sonic2kk sonic2kk deleted the nonsteam-aid-loading-fixes branch October 21, 2023 22:12
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.

1 participant