-
Notifications
You must be signed in to change notification settings - Fork 133
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
Fix float->int conversion overflow behaviour #4237
Conversation
359d76d
to
4539243
Compare
Does this handle underflow cases as well? |
This also fixes "The Talos Principle" timing bug with audio cutting out after a few seconds, and the intro scenes playing on superspeed. |
This also fixes #4217 |
This also fixes Animal Well's music have chirps and pops in it. |
6df5706
to
7a32a1e
Compare
This is always used, removing it avoids needing to handle unused codepaths.
ARM behaviour here is to saturate on overflow or NaN inputs, whereas X86 returns a sentinel value of 2^(bitsize-1), explicitly emulate this.
This works with the standard arm behaviour, this is tested now |
Apparently this also fixes Satisfactory's dedicated server crashing. |
Good fix, and happy new year! For the record though, please avoid opening placeholder PRs without a description and changing them into proper ones after the fact. If people unsubscribe for what looks like a playground PR, these updates will be missed. (Depending on the mail client, all updates will be collapsed under the original PR title as well.) Opening a new PR instead avoids these problems. |
ARM behaviour here is to saturate on overflow or NaN inputs, whereas X86 returns a sentinel value of 2^(bitsize-1), explicitly emulate this.
Closes #2995