GBA BIOS: More tiny fixes to ArcTan2

This commit is contained in:
Vicki Pfau 2017-04-20 23:18:51 -07:00
parent f4abdd6c4c
commit b154457857
2 changed files with 3 additions and 2 deletions

View File

@ -39,7 +39,7 @@ Bugfixes:
- FFmpeg: Fix overflow and general issues with audio encoding
- Qt: Fix crash when changing audio settings after a game is closed
- GBA BIOS: Fix ArcTan sign in HLE BIOS
- GBA BIOS: Fix ArcTan2 sign in HLE BIOS
- GBA BIOS: Fix ArcTan2 sign in HLE BIOS (fixes mgba.io/i/689)
Misc:
- SDL: Remove scancode key input
- GBA Video: Clean up unused timers

View File

@ -359,7 +359,8 @@ void GBASwi16(struct ARMCore* cpu, int immediate) {
cpu->gprs[0] = _ArcTan(cpu->gprs[0]);
break;
case 0xA:
cpu->gprs[0] = _ArcTan2(cpu->gprs[0], cpu->gprs[1]);
cpu->gprs[0] = (uint16_t) _ArcTan2(cpu->gprs[0], cpu->gprs[1]);
cpu->gprs[3] = 0x170;
break;
case 0xB:
case 0xC: