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

Don't blow up everything if a DLC file is moved or renamed. #2867

Merged
merged 4 commits into from Nov 29, 2021

Conversation

lostromb
Copy link
Contributor

If a DLC file goes missing, the user can't even open the DLC dialog to fix it, which leads to bad user experience. This PR adds File.Exists() checks to both the DLC dialog window and the content loader to ignore missing files rather than crashing the program.

@gdkchan gdkchan added fix Fix something gui Related to Ryujinx.Ui labels Nov 21, 2021
@gdkchan
Copy link
Member

gdkchan commented Nov 21, 2021

Potentially closes #1366, but someone will need to check if the other issues have already been fixed.

@lostromb
Copy link
Contributor Author

oh wow there have been a lot of bugs filed for this.

I would also like to fix the weirdness of "enabled DLCs are not marked as enabled when you open the dialog" but I don't understand the data flow well enough to implement it (I assume it would require adding new enabled/disabled flag to the json schema). Also this data is stored as struct which seems like an odd choice to me

@lostromb
Copy link
Contributor Author

My other concern is that allowing games to boot with missing DLC might somehow mess up the save state on the guest if it's not equipped to handle that scenario. Like for example if you have a Torna The Golden Country save but then you remove that DLC from the content loader, maybe the XC2 main game corrupts or deletes that save file somehow. Which makes me wonder if it would be better to either allow the crash on startup or (somewhat better user experience) refuse to boot until the missing DLC errors are resolved.

@gdkchan
Copy link
Member

gdkchan commented Nov 21, 2021

It doesn't delete the save file, the game tells you that you need the DLC to load the save. Other games could behave differently, of course.

@lostromb
Copy link
Contributor Author

lostromb commented Nov 22, 2021

Right.... I'm leaning towards just showing a clear error to the user and aborting boot just to be on the absolute safe side... ideally with a popup window but I don't know how to do that in GTK. So I might alter the runtime check to log a clear error to console and then stop.

@gdkchan
Copy link
Member

gdkchan commented Nov 22, 2021

I think it should be handled in the same way as missing update files for consistency. IIRC it just reverts to the base version if an update is missing, without showing errors. Logging an error is fine.

…add-on NSP based on the enabled state of all NCAs in the package.
@lostromb
Copy link
Contributor Author

fixed the "enabled" flag as well as I could, which addresses one more feedback on #1366

Copy link
Contributor

@Caian Caian left a comment

Choose a reason for hiding this comment

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

LGTM, congratulations!

Copy link
Member

@AcK77 AcK77 left a comment

Choose a reason for hiding this comment

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

LGTM instead of a little nit

Ryujinx.HLE/HOS/ApplicationLoader.cs Outdated Show resolved Hide resolved
Co-authored-by: Ac_K <Acoustik666@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Fix something gui Related to Ryujinx.Ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants