summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorLéo Lam <leo@innovatetechnologi.es>2019-06-14 15:13:43 +0200
committerGitHub <noreply@github.com>2019-06-14 15:13:43 +0200
commit3b7a7ae2e7a6686bc3e8e2537a8a8cd65daf0e95 (patch)
tree3f233931c96f98de5b706e94bd00765a6f41df07 /Source/Core
parente2d59abaa76e1ddf432af657984dee8c97bd83bd (diff)
parent5f3bf405d4d4a26f9bf0ecb1c65d24f98b1bbbe1 (diff)
Merge pull request #8155 from Techjar/dtm-get-origin
Core/Movie: Store PAD_GET_ORIGIN bit in ControllerState
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/Movie.cpp6
-rw-r--r--Source/Core/Core/Movie.h2
2 files changed, 7 insertions, 1 deletions
diff --git a/Source/Core/Core/Movie.cpp b/Source/Core/Core/Movie.cpp
index ad2fce9cd9..76727dcb30 100644
--- a/Source/Core/Core/Movie.cpp
+++ b/Source/Core/Core/Movie.cpp
@@ -804,6 +804,8 @@ void CheckPadStatus(const GCPadStatus* PadStatus, int controllerID)
s_padState.is_connected = PadStatus->isConnected;
+ s_padState.get_origin = (PadStatus->button & PAD_GET_ORIGIN) != 0;
+
s_padState.disc = s_bDiscChange;
s_bDiscChange = false;
s_padState.reset = s_bReset;
@@ -1183,6 +1185,10 @@ void PlayController(GCPadStatus* PadStatus, int controllerID)
PadStatus->button |= PAD_TRIGGER_L;
if (s_padState.R)
PadStatus->button |= PAD_TRIGGER_R;
+
+ if (s_padState.get_origin)
+ PadStatus->button |= PAD_GET_ORIGIN;
+
if (s_padState.disc)
{
Core::RunAsCPUThread([] {
diff --git a/Source/Core/Core/Movie.h b/Source/Core/Core/Movie.h
index 02acfa6661..dc788804f9 100644
--- a/Source/Core/Core/Movie.h
+++ b/Source/Core/Core/Movie.h
@@ -49,7 +49,7 @@ struct ControllerState
bool disc : 1; // Checks for disc being changed
bool reset : 1; // Console reset button
bool is_connected : 1; // Should controller be treated as connected
- bool reserved : 1; // Reserved bits used for padding, 1 bit
+ bool get_origin : 1; // Special bit to indicate analog origin reset
u8 TriggerL, TriggerR; // Triggers, 16 bits
u8 AnalogStickX, AnalogStickY; // Main Stick, 16 bits