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
This commit is contained in:
parent
23f59a82f7
commit
9b20280bcf
|
@ -92,6 +92,14 @@ void Nunchuk::GetState(u8* const data, const bool focus)
|
||||||
ncdata->jx = u8(trim(state[0]));
|
ncdata->jx = u8(trim(state[0]));
|
||||||
ncdata->jy = u8(trim(state[1]));
|
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)
|
if (!focus)
|
||||||
{
|
{
|
||||||
ncdata->jx = cal.jx.center;
|
ncdata->jx = cal.jx.center;
|
||||||
|
|
Loading…
Reference in New Issue