Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Changing the Nunchuk stick axis from center to center + 1
if the other axis isn't at center

because

* it's expected by some emulated programs
  • Loading branch information
john-peterson authored and RachelBryk committed Jul 27, 2013
1 parent 23f59a8 commit 9b20280
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Source/Core/Core/Src/HW/WiimoteEmu/Attachment/Nunchuk.cpp
Expand Up @@ -92,6 +92,14 @@ void Nunchuk::GetState(u8* const data, const bool focus)
ncdata->jx = u8(trim(state[0]));
ncdata->jy = u8(trim(state[1]));

if (ncdata->jx != cal.jx.center || ncdata->jy != cal.jy.center)
{
if (ncdata->jy == cal.jy.center)
ncdata->jy = cal.jy.center + 1;
if (ncdata->jx == cal.jx.center)
ncdata->jx = cal.jx.center + 1;
}

if (!focus)
{
ncdata->jx = cal.jx.center;
Expand Down

0 comments on commit 9b20280

Please sign in to comment.