Fixed the emulation button debouncing issue.
This commit is contained in:
parent
63ee223088
commit
1342ce812b
1 changed files with 9 additions and 3 deletions
|
@ -116,9 +116,15 @@ void IEC_Bus::ReadEmulationMode(void)
|
||||||
IOPort* portB = 0;
|
IOPort* portB = 0;
|
||||||
unsigned gplev0 = read32(ARM_GPIO_GPLEV0);
|
unsigned gplev0 = read32(ARM_GPIO_GPLEV0);
|
||||||
|
|
||||||
UpdateButton(emulationModeCheckButtonIndex, gplev0);
|
int buttonIndex;
|
||||||
emulationModeCheckButtonIndex++;
|
for (buttonIndex = 0; buttonIndex < 3; ++buttonIndex)
|
||||||
emulationModeCheckButtonIndex %= buttonCount;
|
{
|
||||||
|
UpdateButton(buttonIndex, gplev0);
|
||||||
|
}
|
||||||
|
// Doing it this way screws with the debounce counters.
|
||||||
|
//UpdateButton(emulationModeCheckButtonIndex, gplev0);
|
||||||
|
//emulationModeCheckButtonIndex++;
|
||||||
|
//emulationModeCheckButtonIndex %= buttonCount;
|
||||||
|
|
||||||
portB = VIA->GetPortB();
|
portB = VIA->GetPortB();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue