AnalogController: Save buttons and legacy rumble to state

This commit is contained in:
Albert Liu 2020-11-13 07:23:19 -08:00
parent 81a638cabb
commit 7ed0477a29
2 changed files with 4 additions and 1 deletions

View file

@ -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;

View file

@ -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)