mirror of
https://github.com/JaCzekanski/Avocado.git
synced 2024-05-20 12:57:38 -04:00
memory_card: fixed off by one in card numbering
This commit is contained in:
parent
b568e6712f
commit
dd517d8843
|
@ -5,7 +5,7 @@ namespace peripherals {
|
|||
enum class Type { None, Digital, Analog, Mouse, MemoryCard };
|
||||
struct AbstractDevice {
|
||||
Type type;
|
||||
int port; // Physical port number
|
||||
int port; // Physical port number (numbered from 1..n)
|
||||
int state = 0;
|
||||
|
||||
AbstractDevice(Type type, int port);
|
||||
|
|
|
@ -150,7 +150,7 @@ uint8_t MemoryCard::handleWrite(uint8_t byte) {
|
|||
state = 0;
|
||||
command = Command::None;
|
||||
|
||||
bus.notify(Event::Controller::MemoryCardContentsChanged{port});
|
||||
bus.notify(Event::Controller::MemoryCardContentsChanged{port - 1});
|
||||
|
||||
return static_cast<uint8_t>(writeStatus);
|
||||
|
||||
|
|
Loading…
Reference in a new issue