mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-22 22:05:38 +00:00
AnalogController: Save buttons and legacy rumble to state
This commit is contained in:
parent
81a638cabb
commit
7ed0477a29
|
@ -24,6 +24,7 @@ void AnalogController::Reset()
|
|||
{
|
||||
m_analog_mode = false;
|
||||
m_rumble_unlocked = false;
|
||||
m_legacy_rumble_unlocked = false;
|
||||
m_configuration_mode = false;
|
||||
m_command_param = 0;
|
||||
m_motor_state.fill(0);
|
||||
|
@ -41,8 +42,10 @@ bool AnalogController::DoState(StateWrapper& sw)
|
|||
|
||||
sw.Do(&m_analog_mode);
|
||||
sw.Do(&m_rumble_unlocked);
|
||||
sw.DoEx(&m_legacy_rumble_unlocked, 44, false);
|
||||
sw.Do(&m_configuration_mode);
|
||||
sw.Do(&m_command_param);
|
||||
sw.DoEx(&m_button_state, 44, static_cast<u16>(0xFFFF));
|
||||
sw.Do(&m_state);
|
||||
|
||||
MotorState motor_state = m_motor_state;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include "types.h"
|
||||
|
||||
static constexpr u32 SAVE_STATE_MAGIC = 0x43435544;
|
||||
static constexpr u32 SAVE_STATE_VERSION = 43;
|
||||
static constexpr u32 SAVE_STATE_VERSION = 44;
|
||||
static constexpr u32 SAVE_STATE_MINIMUM_VERSION = 42;
|
||||
|
||||
#pragma pack(push, 4)
|
||||
|
|
Loading…
Reference in a new issue