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 throw exception for missing Video until it's played #487

Closed
wants to merge 1 commit into from

Conversation

redmcg
Copy link

@redmcg redmcg commented Jun 3, 2024

This is a PR I originally raised against the wine-mono fork to fix an issue with Hell Yeah! Wrath of the Dead Rabbit (205230):
madewokherd#6

@madewokherd and I thought it would be worth checking to see if this was something wanted upstream.

The PR changes the behavior when a Video file is missing to match what Windows does. Windows will only throw an exception when you attempt to play the Video (rather than when loading the resource).

The aim of the patch is match Windows behavior, and therefore the focus is on the scenario where an XNB file is present. But as it is, this will also modify the behavior when:

  • the XNB file is missing; and
  • calls to FromUriEXT

which may not be desirable.

@flibitijibibo
Copy link
Member

Interesting, so it's kind of like Song where it's really just metadata that gets ignored until VideoPlayer uses it... works for me, but I may have another way of doing this - will report back in a moment.

@flibitijibibo
Copy link
Member

Did my own version of this - the main thing is that raw file behavior is preserved, which is what FNA games will prefer, but I redesigned the Video class in such a way that it acts more like Song, so VideoPlayer now does most of the work:

e86dbcc

Thanks for the PR, this was very useful information to have!

@flibitijibibo
Copy link
Member

Actually woops, I forgot about the path normalizer - I'll apply this next.

@flibitijibibo
Copy link
Member

65f98a8

@redmcg redmcg deleted the bm_fna_cw_23832 branch June 3, 2024 01:41
@redmcg
Copy link
Author

redmcg commented Jun 3, 2024

Thanks @flibitijibibo , can confirm merging this in to wine-mono FNA fixes the issue. 👍

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