From 74390b4cfc06870f0d0d8e5cd2220ff4480daa81 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Fri, 21 Oct 2016 17:24:15 -0700 Subject: [PATCH] PSP2: Improved controller rumble --- CHANGES | 2 ++ src/platform/psp2/psp2-context.c | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index da97fa613..c354d982c 100644 --- a/CHANGES +++ b/CHANGES @@ -9,6 +9,8 @@ Bugfixes: - Qt: Fix setting overrides - Qt: Fix cut off tiles and alignment issues in tile viewer - GBA Cheats: Fix GameShark ROM patches +Misc: + - PSP2: Improved controller rumble 0.5.1: (2016-10-05) Bugfixes: diff --git a/src/platform/psp2/psp2-context.c b/src/platform/psp2/psp2-context.c index 247676e1e..8b75af17c 100644 --- a/src/platform/psp2/psp2-context.c +++ b/src/platform/psp2/psp2-context.c @@ -134,9 +134,11 @@ static void _setRumble(struct mRumble* source, int enable) { 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); }