mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 05:40:01 -06:00
Core/Movie: Store PAD_GET_ORIGIN bit in ControllerState
This fixes the desync on playback of start-from-boot input recordings made while using the GC adapter, as well as other desyncs that could potentially occur in other circumstances where this bit is used. I used a previously reserved bit in the ControllerState to store the new data, so this shouldn't significantly break backwards compatibility. However, tools that aren't aware of this new bit may set it to 0, which will break input recordings that contain it.
This commit is contained in:
@ -803,6 +803,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;
|
||||
@ -1182,6 +1184,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([] {
|
||||
|
Reference in New Issue
Block a user