Fix CompuMate TV mode detect

* Make sure that compumate runs with the proper controllers attached
    * Make sure that CompuMate::myKeyTable is always valid
    * Whitespace fix
This commit is contained in:
Christian Speckner 2016-12-14 21:02:52 +01:00
parent e742686f90
commit 65008135b8
2 changed files with 80 additions and 77 deletions

View File

@ -38,6 +38,8 @@ CompuMate::CompuMate(const Console& console, const Event& event,
myLeftController->myAnalogPinValue[Controller::Five] = Controller::minimumResistance;
myRightController->myAnalogPinValue[Controller::Nine] = Controller::minimumResistance;
myRightController->myAnalogPinValue[Controller::Five] = Controller::maximumResistance;
enableKeyHandling(false);
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -103,6 +103,12 @@ Console::Console(OSystem& osystem, unique_ptr<Cartridge>& cart,
// Auto-detect NTSC/PAL mode if it's requested
string autodetected = "";
myDisplayFormat = myProperties.get(Display_Format);
// Add the real controllers for this system
// This must be done before the debugger is initialized
const string& md5 = myProperties.get(Cartridge_MD5);
setControllers(md5);
if(myDisplayFormat == "AUTO" || myOSystem.settings().getBool("rominfo"))
{
// Run the TIA, looking for PAL scanline patterns
@ -139,11 +145,6 @@ Console::Console(OSystem& osystem, unique_ptr<Cartridge>& cart,
else if(myDisplayFormat == "PAL60") myCurrentFormat = 5;
else if(myDisplayFormat == "SECAM60") myCurrentFormat = 6;
// Add the real controllers for this system
// This must be done before the debugger is initialized
const string& md5 = myProperties.get(Cartridge_MD5);
setControllers(md5);
// Bumper Bash always requires all 4 directions
// Other ROMs can use it if the setting is enabled
bool joyallow4 = md5 == "aa1c41f86ec44c0a44eb64c332ce08af" ||