From 6b260ffa9e87ef7fcb232fd0986bfe00bda8c433 Mon Sep 17 00:00:00 2001 From: ndeadly <24677491+ndeadly@users.noreply.github.com> Date: Sat, 4 Jul 2020 21:19:52 +0200 Subject: [PATCH] btdrv-mitm: scale wii u pro controller stick coordinates --- btdrv-mitm/source/controllers/wiiupro.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/btdrv-mitm/source/controllers/wiiupro.cpp b/btdrv-mitm/source/controllers/wiiupro.cpp index f5a7b9c..36d3a1e 100644 --- a/btdrv-mitm/source/controllers/wiiupro.cpp +++ b/btdrv-mitm/source/controllers/wiiupro.cpp @@ -70,12 +70,12 @@ namespace controller { void WiiUProController::handleInputReport0x34(const WiiUProReportData *src, SwitchReportData *dst) { packStickData(&dst->report0x30.left_stick, - src->report0x34.left_stick_x, - src->report0x34.left_stick_y + ((3 * (src->report0x34.left_stick_x - STICK_ZERO)) >> 1) + STICK_ZERO, + ((3 * (src->report0x34.left_stick_y - STICK_ZERO)) >> 1) + STICK_ZERO ); packStickData(&dst->report0x30.right_stick, - src->report0x34.right_stick_x, - src->report0x34.right_stick_y + ((3 * (src->report0x34.right_stick_x - STICK_ZERO)) >> 1) + STICK_ZERO, + ((3 * (src->report0x34.right_stick_y - STICK_ZERO)) >> 1) + STICK_ZERO ); dst->report0x30.buttons.dpad_down = !src->report0x34.buttons.dpad_down;