From e3ebdd45859a02a4fc96ed6c7ed0feb9e2196d03 Mon Sep 17 00:00:00 2001 From: brand175 <20964160+brand175@users.noreply.github.com> Date: Tue, 15 May 2018 16:01:27 -0700 Subject: [PATCH] Controller Stick Fix #2 The controller can now function properly. I think I might need to adjust it to 128 because I get 127,127 ANA on the input-display before touching the sticks but disappears after I touch it. --- GC4iOS/UI/EmulatorViewController.mm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/GC4iOS/UI/EmulatorViewController.mm b/GC4iOS/UI/EmulatorViewController.mm index 5be7769..74a3eea 100644 --- a/GC4iOS/UI/EmulatorViewController.mm +++ b/GC4iOS/UI/EmulatorViewController.mm @@ -66,7 +66,7 @@ - (void)viewWillLayoutSubviews #pragma mark - Controller Delegate u16 buttonState; -CGPoint joyData[2]; +CGPoint joyData[2] = {127.5,127.5,127.5,127.5}; ////This is a terrible hack. We need to configure dolphin to use a custom controller not just override this function void GCPad::GetInput(GCPadStatus* const pad) @@ -85,8 +85,8 @@ - (void)viewWillLayoutSubviews // Create a new class to handle the controller later - (void)joystick:(NSInteger)joyid movedToPosition:(CGPoint)joyPosition { - joyData[joyid].x = joyPosition.x * 126 + 127; - joyData[joyid].y = joyPosition.y * 126 + 127; + joyData[joyid].x = joyPosition.x * 127 + 128; + joyData[joyid].y = joyPosition.y * 127 + 128; } - (void)buttonStateChanged:(u16)bState