slightly better abstraction

This commit is contained in:
Simone Coco
2024-05-17 16:08:10 +02:00
parent 6336780477
commit 46853ecdf1
2 changed files with 43 additions and 36 deletions

View File

@@ -169,6 +169,13 @@ struct PIF {
void EepromRead(const u8*, u8*, const Mem&) const;
void EepromWrite(const u8*, u8*, const Mem&);
std::vector<u8> Serialize();
void UpdateButton(int index, Controller::Key k, bool state) {
joybusDevices[index].controller.UpdateButton(k, state);
}
void UpdateAxis(int index, Controller::Axis a, s8 state) {
joybusDevices[index].controller.UpdateAxis(a, state);
}
bool mempakOpen = false;
JoybusDevice joybusDevices[6]{};