From 5a3d0460c2486a111b3318b959b49fdea92a820e Mon Sep 17 00:00:00 2001 From: Marcos Diaz Date: Sun, 31 May 2026 19:54:18 +0300 Subject: [PATCH] Fixed incorrect preview of rotation mode starting angle --- src/components/profile/section.ts | 10 ++++++++++ src/lib/plot.ts | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/components/profile/section.ts b/src/components/profile/section.ts index 245c8bd..cb8e2a4 100644 --- a/src/components/profile/section.ts +++ b/src/components/profile/section.ts @@ -222,6 +222,16 @@ export class SectionComponent { return true } + thumbstickGetActionAngle(thumbstick: CtrlThumbstick) { + const profile = this.profiles.profiles[this.profileIndex] + const actions = profile.thumbstickGetActions(thumbstick) + if (actions.up[0] .length > 0) return 0 + else if (actions.right[0].length > 0) return 90 + else if (actions.down[0] .length > 0) return 180 + else if (actions.left[0] .length > 0) return 270 + else return 0 + } + buttonsCanHaveModifiers(button: CtrlButton) { const sectionName = SectionIndex[button.sectionIndex] const is_cardinal = ( diff --git a/src/lib/plot.ts b/src/lib/plot.ts index 88ffe25..78090d4 100644 --- a/src/lib/plot.ts +++ b/src/lib/plot.ts @@ -138,7 +138,7 @@ export const plotRotation = (section: SectionComponent) => { const CenterDeadzone = thumbstick.rot_center_deadzone const entryDeadzone = thumbstick.rot_entry_deadzone const anticlockwise = thumbstick.rot_anticlockwise - const entryAngle = thumbstick.rot_relative_mode ? 45 : 0 + const entryAngle = thumbstick.rot_relative_mode ? 45 : section.thumbstickGetActionAngle(thumbstick) let sensAngle = 0 let sensLabel = '' let bidirectional = false