Merge pull request #9738 from JosJuice/interpreter-fctiwx

Interpreter: Fix fctiwx rounding
This commit is contained in:
Mai M 2021-05-22 13:07:36 -04:00 committed by GitHub
commit 031bef0ad9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -73,7 +73,8 @@ void ConvertToInteger(UGeckoInstruction inst, RoundingMode rounding_mode)
const double t = b + 0.5; const double t = b + 0.5;
i = static_cast<s32>(t); i = static_cast<s32>(t);
if (t - i < 0 || (t - i == 0 && b > 0)) // Ties to even
if (t - i < 0 || (t - i == 0 && (i & 1)))
{ {
i--; i--;
} }