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

core: Handle the case where frame rate is set to 0 #18419

Merged
merged 1 commit into from
Nov 6, 2024

Conversation

Toad06
Copy link
Member

@Toad06 Toad06 commented Oct 28, 2024

In the current builds, any SWF file with a frame rate set to 0 in its header fails to run. This actually makes some sense, but Flash disagrees.

This PR fixes this issue and makes the following SWF work: telepoche040110.swf, created with the third-party tool Print2Flash.

I also made a few changes to the Stage.frameRate property in AVM2 to align with Flash's behavior.

@kjarosh kjarosh added A-core Area: Core player, where no other category fits T-fix Type: Bug fix (in something that's supposed to work already) labels Oct 29, 2024
@Toad06
Copy link
Member Author

Toad06 commented Oct 31, 2024

This also happens for NaN, so this case is now covered as well.

@Toad06 Toad06 added the waiting-on-review Waiting on review from a Ruffle team member label Nov 4, 2024
@kjarosh kjarosh merged commit 9eca71f into ruffle-rs:master Nov 6, 2024
22 checks passed
@kjarosh
Copy link
Member

kjarosh commented Nov 6, 2024

Thank you!

@Toad06
Copy link
Member Author

Toad06 commented Nov 6, 2024

Thank you for the reviews. 😉

@Toad06 Toad06 deleted the framerate branch November 6, 2024 15:07
@Toad06 Toad06 removed the waiting-on-review Waiting on review from a Ruffle team member label Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-core Area: Core player, where no other category fits T-fix Type: Bug fix (in something that's supposed to work already)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants