Merge pull request #409 from lioncash/lolmemset

Explicitly center the X and Y joystick values.
This commit is contained in:
Pierre Bourdon 2014-05-28 12:19:48 +02:00
commit 2a14c55279
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 // if gui has lock (messing with controls), skip this input cycle
// center axes and return // center axes and return
memset(&_pPADStatus->stickX, 0x80, 4); _pPADStatus->stickX = 0x80;
_pPADStatus->stickY = 0x80;
_pPADStatus->substickX = 0x80;
_pPADStatus->substickY = 0x80;
return; return;
} }

View File

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