summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorPierre Bourdon <delroth@gmail.com>2014-05-28 12:19:48 +0200
committerPierre Bourdon <delroth@gmail.com>2014-05-28 12:19:48 +0200
commit2a14c55279e651e8eebf754498e22846dadf4773 (patch)
treef9185db328cf8f0755354f724a88d63a2387f889 /Source/Core
parentf120d333b73504618c38296c6d9207a7ac47563d (diff)
parent9e7c5c0e582157ddbd722f4213d17c01a9f95dfa (diff)
Merge pull request #409 from lioncash/lolmemset
Explicitly center the X and Y joystick values.
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/HW/GCPad.cpp5
-rw-r--r--Source/Core/Core/HW/GCPadEmu.cpp5
2 files changed, 8 insertions, 2 deletions
diff --git a/Source/Core/Core/HW/GCPad.cpp b/Source/Core/Core/HW/GCPad.cpp
index 8c17a3d4df..6b6b968f57 100644
--- a/Source/Core/Core/HW/GCPad.cpp
+++ b/Source/Core/Core/HW/GCPad.cpp
@@ -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;
}
diff --git a/Source/Core/Core/HW/GCPadEmu.cpp b/Source/Core/Core/HW/GCPadEmu.cpp
index ad24815916..0a36c725b9 100644
--- a/Source/Core/Core/HW/GCPadEmu.cpp
+++ b/Source/Core/Core/HW/GCPadEmu.cpp
@@ -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;
}
}