Skip to content

Commit

Permalink
PCE: Added missing controller data to save states
Browse files Browse the repository at this point in the history
  • Loading branch information
SourMesen committed Jul 2, 2024
1 parent c7f97ab commit 16e0f71
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Core/PCE/Input/PceAvenuePad6.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@ class PceAvenuePad6 : public BaseControlDevice
{
}

void Serialize(Serializer& s) override
{
BaseControlDevice::Serialize(s);
SV(_disableInput);
SV(_selectDPad);
SV(_selectExtraButtons);
}

public:
enum Buttons { Up = 0, Down, Left, Right, Select, Run, I, II, III, IV, V, VI };

Expand Down
7 changes: 7 additions & 0 deletions Core/PCE/Input/PceController.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ class PceController : public BaseControlDevice
{
}

void Serialize(Serializer& s) override
{
BaseControlDevice::Serialize(s);
SV(_disableInput);
SV(_selectDPad);
}

public:
enum Buttons { Up = 0, Down, Left, Right, Select, Run, I, II };

Expand Down
7 changes: 7 additions & 0 deletions Core/PCE/Input/PceTurboTap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,10 @@ void PceTurboTap::WriteRam(uint16_t addr, uint8_t value)
WritePort(i, i == _selectedPort ? value : 0x03);
}
}

void PceTurboTap::Serialize(Serializer& s)
{
BaseControlDevice::Serialize(s);
SV(_selectedPort);
SV(_prevValue);
}
2 changes: 2 additions & 0 deletions Core/PCE/Input/PceTurboTap.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ class PceTurboTap : public ControllerHub<5>

uint8_t ReadRam(uint16_t addr) override;
void WriteRam(uint16_t addr, uint8_t value) override;

void Serialize(Serializer& s) override;
};

0 comments on commit 16e0f71

Please sign in to comment.