Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions GC4iOS/UI/EmulatorViewController.mm
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,16 @@ - (void)viewWillLayoutSubviews

pad->substickX = (uint8_t)joyData[1].x;
pad->substickY = (uint8_t)joyData[1].y;

pad->triggerLeft = buttonState * 2;
pad->triggerRight = buttonState * 4;
}

// 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
Expand Down