mirror of https://github.com/mgba-emu/mgba.git
PSP2: Improved controller rumble
This commit is contained in:
parent
a27cb6c040
commit
dec8a1223c
1
CHANGES
1
CHANGES
|
@ -23,6 +23,7 @@ Misc:
|
||||||
- GBA Video: Allow multiple handles into the same tile cache
|
- GBA Video: Allow multiple handles into the same tile cache
|
||||||
- VFS: Call msync when syncing mapped data
|
- VFS: Call msync when syncing mapped data
|
||||||
- GBA Video, GB Video: Colors are now fully scaled
|
- GBA Video, GB Video: Colors are now fully scaled
|
||||||
|
- PSP2: Improved controller rumble
|
||||||
|
|
||||||
0.5.1: (2016-10-05)
|
0.5.1: (2016-10-05)
|
||||||
Bugfixes:
|
Bugfixes:
|
||||||
|
|
|
@ -134,9 +134,11 @@ static void _setRumble(struct mRumble* source, int enable) {
|
||||||
rumble->current -= oldLevel;
|
rumble->current -= oldLevel;
|
||||||
}
|
}
|
||||||
CircleBufferWrite8(&rumble->history, enable);
|
CircleBufferWrite8(&rumble->history, enable);
|
||||||
|
int small = (rumble->current << 21) / 65793;
|
||||||
|
int big = ((rumble->current * rumble->current) << 18) / 65793;
|
||||||
struct SceCtrlActuator state = {
|
struct SceCtrlActuator state = {
|
||||||
rumble->current * 31,
|
small,
|
||||||
0
|
big
|
||||||
};
|
};
|
||||||
sceCtrlSetActuator(1, &state);
|
sceCtrlSetActuator(1, &state);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue