mirror of https://github.com/stella-emu/stella.git
Fixed potential bug in dynamically swapping Stelladaptor devices;
events generated by one device would never receive the 'turn off' event when it was swapped out. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2407 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
2ff4226e67
commit
d0b8bd57e5
|
@ -20,7 +20,9 @@
|
||||||
device.
|
device.
|
||||||
|
|
||||||
* Added ability to dynamically swap the port order of Stelladaptor/
|
* Added ability to dynamically swap the port order of Stelladaptor/
|
||||||
2600-daptor devices with the 'Control-1' key combo.
|
2600-daptor devices with the 'Control-1' key combo (useful if you
|
||||||
|
have only one 2600-daptor and want to use it as a left port
|
||||||
|
normally, but as a right port for Star Raiders, etc).
|
||||||
|
|
||||||
* Fixed bug in BoosterGrip controller emulation; the functionality
|
* Fixed bug in BoosterGrip controller emulation; the functionality
|
||||||
of the booster and trigger buttons was reversed. Related to this,
|
of the booster and trigger buttons was reversed. Related to this,
|
||||||
|
|
|
@ -276,6 +276,19 @@ void EventHandler::mapStelladaptors(const string& saport)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
myOSystem->settings().setString("saport", saport);
|
myOSystem->settings().setString("saport", saport);
|
||||||
|
|
||||||
|
// We're potentially swapping out an input device behind the back of
|
||||||
|
// the Event system, so we make sure all Stelladaptor-generated events
|
||||||
|
// are reset
|
||||||
|
for(int i = 0; i < 2; ++i)
|
||||||
|
{
|
||||||
|
for(int j = 0; j < 2; ++j)
|
||||||
|
myEvent.set(SA_Axis[i][j], 0);
|
||||||
|
for(int j = 0; j < 4; ++j)
|
||||||
|
myEvent.set(SA_Button[i][j], 0);
|
||||||
|
for(int j = 0; j < 12; ++j)
|
||||||
|
myEvent.set(SA_Key[i][j], 0);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue