Explicitly center the X and Y joystick values.

More self-explanatory at a glance than a memset.
This commit is contained in:
Lioncash 2014-05-24 20:10:01 -04:00
parent b584fcc86c
commit 9e7c5c0e58
2 changed files with 8 additions and 2 deletions

View File

@ -58,7 +58,10 @@ void GetStatus(u8 _numPAD, SPADStatus* _pPADStatus)
{
// if gui has lock (messing with controls), skip this input cycle
// center axes and return
memset(&_pPADStatus->stickX, 0x80, 4);
_pPADStatus->stickX = 0x80;
_pPADStatus->stickY = 0x80;
_pPADStatus->substickX = 0x80;
_pPADStatus->substickY = 0x80;
return;
}

View File

@ -112,7 +112,10 @@ void GCPad::GetInput(SPADStatus* const pad)
else
{
// center sticks
memset(&pad->stickX, 0x80, 4);
pad->stickX = 0x80;
pad->stickY = 0x80;
pad->substickX = 0x80;
pad->substickY = 0x80;
}
}