all repos — mgba @ dec8a1223c5199c632b89d659dfc28e7f2bee8fb

mGBA Game Boy Advance Emulator

PSP2: Improved controller rumble
Jeffrey Pfau jeffrey@endrift.com
Fri, 21 Oct 2016 17:24:15 -0700
commit

dec8a1223c5199c632b89d659dfc28e7f2bee8fb

parent

a27cb6c040a0515d004456c20a0842ec2bcbf652

2 files changed, 5 insertions(+), 2 deletions(-)

jump to
M CHANGESCHANGES

@@ -23,6 +23,7 @@ - Test: Add a basic test suite

- GBA Video: Allow multiple handles into the same tile cache - VFS: Call msync when syncing mapped data - GBA Video, GB Video: Colors are now fully scaled + - PSP2: Improved controller rumble 0.5.1: (2016-10-05) Bugfixes:
M src/platform/psp2/psp2-context.csrc/platform/psp2/psp2-context.c

@@ -134,9 +134,11 @@ CircleBufferRead8(&rumble->history, &oldLevel);

rumble->current -= oldLevel; } CircleBufferWrite8(&rumble->history, enable); + int small = (rumble->current << 21) / 65793; + int big = ((rumble->current * rumble->current) << 18) / 65793; struct SceCtrlActuator state = { - rumble->current * 31, - 0 + small, + big }; sceCtrlSetActuator(1, &state); }