mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-25 15:15:40 +00:00
MemoryCard: Save FLAG to state
This commit is contained in:
parent
92255c8ddd
commit
25af5ef9d9
|
@ -26,6 +26,7 @@ void MemoryCard::Reset()
|
|||
{
|
||||
ResetTransferState();
|
||||
SaveIfChanged(true);
|
||||
m_FLAG.no_write_yet = true;
|
||||
}
|
||||
|
||||
bool MemoryCard::DoState(StateWrapper& sw)
|
||||
|
@ -34,6 +35,7 @@ bool MemoryCard::DoState(StateWrapper& sw)
|
|||
SaveIfChanged(true);
|
||||
|
||||
sw.Do(&m_state);
|
||||
sw.Do(&m_FLAG.bits);
|
||||
sw.Do(&m_address);
|
||||
sw.Do(&m_sector_offset);
|
||||
sw.Do(&m_checksum);
|
||||
|
|
|
@ -49,8 +49,6 @@ private:
|
|||
BitField<u8, bool, 2, 1> write_error;
|
||||
};
|
||||
|
||||
FLAG m_FLAG = {};
|
||||
|
||||
enum class State : u8
|
||||
{
|
||||
Idle,
|
||||
|
@ -91,6 +89,7 @@ private:
|
|||
std::unique_ptr<TimingEvent> m_save_event;
|
||||
|
||||
State m_state = State::Idle;
|
||||
FLAG m_FLAG = {};
|
||||
u16 m_address = 0;
|
||||
u8 m_sector_offset = 0;
|
||||
u8 m_checksum = 0;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include "types.h"
|
||||
|
||||
static constexpr u32 SAVE_STATE_MAGIC = 0x43435544;
|
||||
static constexpr u32 SAVE_STATE_VERSION = 25;
|
||||
static constexpr u32 SAVE_STATE_VERSION = 26;
|
||||
|
||||
#pragma pack(push, 4)
|
||||
struct SAVE_STATE_HEADER
|
||||
|
|
Loading…
Reference in a new issue