Skip to content

Instantly share code, notes, and snippets.

@PGGB
Created May 30, 2014 21:10
Show Gist options
  • Save PGGB/f896a0d6200c7960bb37 to your computer and use it in GitHub Desktop.
Save PGGB/f896a0d6200c7960bb37 to your computer and use it in GitHub Desktop.
- (oneway void)didMovePSXJoystickDirection:(OEPSXButton)button withValue:(CGFloat)value forPlayer:(NSUInteger)player
{
int analogNumber = PSXMap[button] - 17;
uint8_t *buf = (uint8_t *)inputBuffer[player-1];
buf[3 + analogNumber] = 32767 * value;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment