Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #409 from lioncash/lolmemset
Explicitly center the X and Y joystick values.
  • Loading branch information
delroth committed May 28, 2014
2 parents f120d33 + 9e7c5c0 commit 2a14c55
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion Source/Core/Core/HW/GCPad.cpp
Expand Up @@ -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;
}

Expand Down
5 changes: 4 additions & 1 deletion Source/Core/Core/HW/GCPadEmu.cpp
Expand Up @@ -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;
}
}

Expand Down

0 comments on commit 2a14c55

Please sign in to comment.