From 75527ca670e2e9bd77afb40c89ad6dfc062cada4 Mon Sep 17 00:00:00 2001 From: thrust26 Date: Tue, 2 Mar 2021 14:01:57 +0100 Subject: [PATCH] fixed QuadTari handling for controller types != joysticks --- src/common/PKeyboardHandler.cxx | 119 +++++++++++++++++++++++++------- src/common/PKeyboardHandler.hxx | 12 +++- src/common/Version.hxx | 2 +- src/common/jsonDefinitions.hxx | 4 ++ src/emucore/CartBUS.hxx | 2 +- src/emucore/Console.cxx | 4 +- src/emucore/Control.hxx | 2 +- src/emucore/Event.hxx | 19 +++++ src/emucore/EventHandler.cxx | 6 ++ src/emucore/EventHandler.hxx | 7 +- src/emucore/Paddles.cxx | 68 ++++++++++++------ src/emucore/Paddles.hxx | 2 +- src/emucore/QuadTari.cxx | 3 +- src/emucore/QuadTari.hxx | 7 ++ 14 files changed, 200 insertions(+), 57 deletions(-) diff --git a/src/common/PKeyboardHandler.cxx b/src/common/PKeyboardHandler.cxx index d617d68fe..9dbae1cdf 100644 --- a/src/common/PKeyboardHandler.cxx +++ b/src/common/PKeyboardHandler.cxx @@ -17,6 +17,7 @@ #include "OSystem.hxx" #include "Console.hxx" +#include "PropsSet.hxx" #include "EventHandler.hxx" #include "PKeyboardHandler.hxx" #include "json_lib.hxx" @@ -202,38 +203,72 @@ void PhysicalKeyboardHandler::setDefaultMapping(Event::Type event, EventMode mod // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void PhysicalKeyboardHandler::defineControllerMappings( - const Controller::Type type, Controller::Jack port) + const Controller::Type type, Controller::Jack port, const string& md5) { // determine controller events to use + switch(type) + { + case Controller::Type::QuadTari: + if(port == Controller::Jack::Left) + { + myLeftMode = getMode(md5, PropType::Controller_Left1); + myLeft2ndMode = getMode(md5, PropType::Controller_Left2); + } + else + { + myRightMode = getMode(md5, PropType::Controller_Right1); + myRight2ndMode = getMode(md5, PropType::Controller_Right2); + } + break; + + default: + { + EventMode mode = getMode(type); + + if(port == Controller::Jack::Left) + myLeftMode = mode; + else + myRightMode = mode; + break; + } + } +} + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +EventMode PhysicalKeyboardHandler::getMode(const string& md5, const PropType propType) +{ + Properties properties; + + if(myOSystem.propSet().getMD5(md5, properties)) + { + const string& propName = properties.get(propType); + + if(!propName.empty()) + return getMode(Controller::getType(propName)); + } + return getMode(Controller::Type::Joystick); +} + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +EventMode PhysicalKeyboardHandler::getMode(const Controller::Type type) +{ switch(type) { case Controller::Type::Keyboard: case Controller::Type::KidVid: - if(port == Controller::Jack::Left) - myLeftMode = EventMode::kKeypadMode; - else - myRightMode = EventMode::kKeypadMode; - break; + return EventMode::kKeypadMode; case Controller::Type::Paddles: case Controller::Type::PaddlesIAxDr: case Controller::Type::PaddlesIAxis: - if(port == Controller::Jack::Left) - myLeftMode = EventMode::kPaddlesMode; - else - myRightMode = EventMode::kPaddlesMode; - break; + return EventMode::kPaddlesMode; case Controller::Type::CompuMate: - myLeftMode = myRightMode = EventMode::kCompuMateMode; - break; + return EventMode::kCompuMateMode; default: // let's use joystick then - if(port == Controller::Jack::Left) - myLeftMode = EventMode::kJoystickMode; - else - myRightMode = EventMode::kJoystickMode; + return EventMode::kJoystickMode; } } @@ -244,9 +279,31 @@ void PhysicalKeyboardHandler::enableEmulationMappings() myKeyMap.eraseMode(EventMode::kEmulationMode); enableCommonMappings(); - // enable right mode first, so that in case of mapping clashes the left - // controller has preference - switch (myRightMode) + // Process in increasing priority order, so that in case of mapping clashes + // the higher priority controller has preference + switch(myRight2ndMode) + { + case EventMode::kPaddlesMode: + enableMappings(Right2PaddlesEvents, EventMode::kPaddlesMode); + break; + + default: + enableMappings(Right2JoystickEvents, EventMode::kJoystickMode); + break; + } + + switch(myLeft2ndMode) + { + case EventMode::kPaddlesMode: + enableMappings(Left2PaddlesEvents, EventMode::kPaddlesMode); + break; + + default: + enableMappings(Left2JoystickEvents, EventMode::kJoystickMode); + break; + } + + switch(myRightMode) { case EventMode::kPaddlesMode: enableMappings(RightPaddlesEvents, EventMode::kPaddlesMode); @@ -265,7 +322,7 @@ void PhysicalKeyboardHandler::enableEmulationMappings() break; } - switch (myLeftMode) + switch(myLeftMode) { case EventMode::kPaddlesMode: enableMappings(LeftPaddlesEvents, EventMode::kPaddlesMode); @@ -276,7 +333,7 @@ void PhysicalKeyboardHandler::enableEmulationMappings() break; case EventMode::kCompuMateMode: - for (const auto& item : CompuMateMapping) + for(const auto& item : CompuMateMapping) enableMapping(item.event, EventMode::kCompuMateMode); break; @@ -343,14 +400,18 @@ EventMode PhysicalKeyboardHandler::getEventMode(const Event::Type event, bool PhysicalKeyboardHandler::isJoystickEvent(const Event::Type event) const { return LeftJoystickEvents.find(event) != LeftJoystickEvents.end() - || RightJoystickEvents.find(event) != RightJoystickEvents.end(); + || Left2JoystickEvents.find(event) != Left2JoystickEvents.end() + || RightJoystickEvents.find(event) != RightJoystickEvents.end() + || Right2JoystickEvents.find(event) != Right2JoystickEvents.end(); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bool PhysicalKeyboardHandler::isPaddleEvent(const Event::Type event) const { return LeftPaddlesEvents.find(event) != LeftPaddlesEvents.end() - || RightPaddlesEvents.find(event) != RightPaddlesEvents.end(); + || Left2PaddlesEvents.find(event) != Left2PaddlesEvents.end() + || RightPaddlesEvents.find(event) != RightPaddlesEvents.end() + || Right2PaddlesEvents.find(event) != Right2PaddlesEvents.end(); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -412,7 +473,8 @@ bool PhysicalKeyboardHandler::addMapping(Event::Type event, EventMode mode, } myKeyMap.add(event, evMode, key, mod); - if (evMode == myLeftMode || evMode == myRightMode) + if (evMode == myLeftMode || evMode == myRightMode || + evMode == myLeft2ndMode || evMode == myRight2ndMode) myKeyMap.add(event, mode, key, mod); } @@ -858,6 +920,7 @@ PhysicalKeyboardHandler::EventMappingArray PhysicalKeyboardHandler::DefaultJoyst {Event::JoystickOneFire5, KBDK_6}, {Event::JoystickOneFire9, KBDK_7}, + // Same as Joysticks Zero & One + SHIFT {Event::JoystickTwoUp, KBDK_UP, KBDM_SHIFT}, {Event::JoystickTwoDown, KBDK_DOWN, KBDM_SHIFT}, {Event::JoystickTwoLeft, KBDK_LEFT, KBDM_SHIFT}, @@ -896,6 +959,12 @@ PhysicalKeyboardHandler::DefaultPaddleMapping = { {Event::PaddleThreeDecrease, KBDK_H}, {Event::PaddleThreeIncrease, KBDK_Y}, {Event::PaddleThreeFire, KBDK_6}, + + // Same as Paddles Zero..Three Fire + SHIFT + {Event::PaddleFourFire, KBDK_SPACE, KBDM_SHIFT}, + {Event::PaddleFiveFire, KBDK_4, KBDM_SHIFT}, + {Event::PaddleSixFire, KBDK_F, KBDM_SHIFT}, + {Event::PaddleSevenFire, KBDK_6, KBDM_SHIFT}, }; // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/common/PKeyboardHandler.hxx b/src/common/PKeyboardHandler.hxx index 2b107c8b9..73b29a206 100644 --- a/src/common/PKeyboardHandler.hxx +++ b/src/common/PKeyboardHandler.hxx @@ -26,6 +26,7 @@ class EventHandler; #include "bspf.hxx" #include "Event.hxx" #include "EventHandlerConstants.hxx" +#include "Props.hxx" #include "KeyMap.hxx" /** @@ -50,7 +51,8 @@ class PhysicalKeyboardHandler void setDefaultMapping(Event::Type type, EventMode mode, bool updateDefaults = false); /** define mappings for current controllers */ - void defineControllerMappings(const Controller::Type type, Controller::Jack port); + void defineControllerMappings(const Controller::Type type, Controller::Jack port, + const string& md5); /** enable mappings for emulation mode */ void enableEmulationMappings(); @@ -110,6 +112,11 @@ class PhysicalKeyboardHandler void enableMappings(const Event::EventSet& events, EventMode mode); void enableMapping(const Event::Type event, EventMode mode); + /** return event mode for given property */ + EventMode getMode(const string& md5, const PropType propType); + /** return event mode for given controller type */ + EventMode getMode(const Controller::Type type); + private: OSystem& myOSystem; EventHandler& myHandler; @@ -119,6 +126,9 @@ class PhysicalKeyboardHandler EventMode myLeftMode{EventMode::kEmulationMode}; EventMode myRightMode{EventMode::kEmulationMode}; + // Additional modes for QuadTari controller + EventMode myLeft2ndMode{EventMode::kEmulationMode}; + EventMode myRight2ndMode{EventMode::kEmulationMode}; #ifdef BSPF_UNIX // Sometimes key combos with the Alt key become 'stuck' after the diff --git a/src/common/Version.hxx b/src/common/Version.hxx index 36e13c39e..a85f063bd 100644 --- a/src/common/Version.hxx +++ b/src/common/Version.hxx @@ -18,7 +18,7 @@ #ifndef VERSION_HXX #define VERSION_HXX -#define STELLA_VERSION "6.5.2" +#define STELLA_VERSION "6.6_pre" #define STELLA_BUILD "6719" #endif diff --git a/src/common/jsonDefinitions.hxx b/src/common/jsonDefinitions.hxx index 8cdda040e..9d0f023db 100644 --- a/src/common/jsonDefinitions.hxx +++ b/src/common/jsonDefinitions.hxx @@ -112,6 +112,10 @@ NLOHMANN_JSON_SERIALIZE_ENUM(Event::Type, { {Event::PaddleThreeIncrease, "PaddleThreeIncrease"}, {Event::PaddleThreeAnalog, "PaddleThreeAnalog"}, {Event::PaddleThreeFire, "PaddleThreeFire"}, + {Event::PaddleFourFire, "PaddleFourFire"}, + {Event::PaddleFiveFire, "PaddleFiveFire"}, + {Event::PaddleSixFire, "PaddleSixFire"}, + {Event::PaddleSevenFire, "PaddleSevenFire"}, {Event::KeyboardZero1, "KeyboardZero1"}, {Event::KeyboardZero2, "KeyboardZero2"}, {Event::KeyboardZero3, "KeyboardZero3"}, diff --git a/src/emucore/CartBUS.hxx b/src/emucore/CartBUS.hxx index 27b8494e8..dde5faaa9 100644 --- a/src/emucore/CartBUS.hxx +++ b/src/emucore/CartBUS.hxx @@ -35,7 +35,7 @@ class Thumbulator; IN A FUTURE RELEASE. There are seven 4K program banks, a 4K Display Data RAM, - 1K C Varaible and Stack, and the BUS chip. + 1K C Variable and Stack, and the BUS chip. BUS chip access is mapped to $1000 - $103F. @authors: Darrell Spice Jr, Chris Walton, Fred Quimby, diff --git a/src/emucore/Console.cxx b/src/emucore/Console.cxx index d3eb156ba..c9be189de 100644 --- a/src/emucore/Console.cxx +++ b/src/emucore/Console.cxx @@ -806,7 +806,7 @@ void Console::setControllers(const string& romMd5) myLeftControl = std::move(myCMHandler->leftController()); myRightControl = std::move(myCMHandler->rightController()); myOSystem.eventHandler().defineKeyControllerMappings( - Controller::Type::CompuMate, Controller::Jack::Left); + Controller::Type::CompuMate, Controller::Jack::Left, romMd5); myOSystem.eventHandler().defineJoyControllerMappings( Controller::Type::CompuMate, Controller::Jack::Left); } @@ -898,7 +898,7 @@ unique_ptr Console::getControllerPort(const Controller::Type type, { unique_ptr controller; - myOSystem.eventHandler().defineKeyControllerMappings(type, port); + myOSystem.eventHandler().defineKeyControllerMappings(type, port, romMd5); myOSystem.eventHandler().defineJoyControllerMappings(type, port); switch(type) diff --git a/src/emucore/Control.hxx b/src/emucore/Control.hxx index 0cb992306..8b8f1e9bb 100644 --- a/src/emucore/Control.hxx +++ b/src/emucore/Control.hxx @@ -73,7 +73,7 @@ class Controller : public Serializable /** Enumeration of the controller jacks */ - enum class Jack { Left = 0, Right = 1 }; + enum class Jack { Left = 0, Right = 1, Left2 = 2, Right2 = 3 }; /** Enumeration of the digital pins of a controller port diff --git a/src/emucore/Event.hxx b/src/emucore/Event.hxx index 227a536dd..8cf789ea6 100644 --- a/src/emucore/Event.hxx +++ b/src/emucore/Event.hxx @@ -165,7 +165,9 @@ class Event DecreasePaddleCenterY, IncreasePaddleCenterY, PreviousMouseControl, DecreaseMouseAxesRange, IncreaseMouseAxesRange, + SALeftAxis0Value, SALeftAxis1Value, SARightAxis0Value, SARightAxis1Value, + PaddleFourFire, PaddleFiveFire, PaddleSixFire, PaddleSevenFire, LastType }; @@ -255,13 +257,20 @@ class Event static const Event::EventSet LeftJoystickEvents = { Event::JoystickZeroUp, Event::JoystickZeroDown, Event::JoystickZeroLeft, Event::JoystickZeroRight, Event::JoystickZeroFire, Event::JoystickZeroFire5, Event::JoystickZeroFire9, +}; +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +static const Event::EventSet Left2JoystickEvents = { Event::JoystickTwoUp, Event::JoystickTwoDown, Event::JoystickTwoLeft, Event::JoystickTwoRight, Event::JoystickTwoFire }; + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - static const Event::EventSet RightJoystickEvents = { Event::JoystickOneUp, Event::JoystickOneDown, Event::JoystickOneLeft, Event::JoystickOneRight, Event::JoystickOneFire, Event::JoystickOneFire5, Event::JoystickOneFire9, +}; +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +static const Event::EventSet Right2JoystickEvents = { Event::JoystickThreeUp, Event::JoystickThreeDown, Event::JoystickThreeLeft, Event::JoystickThreeRight, Event::JoystickThreeFire }; @@ -271,12 +280,22 @@ static const Event::EventSet LeftPaddlesEvents = { Event::PaddleZeroDecrease, Event::PaddleZeroIncrease, Event::PaddleZeroAnalog, Event::PaddleZeroFire, Event::PaddleOneDecrease, Event::PaddleOneIncrease, Event::PaddleOneAnalog, Event::PaddleOneFire, }; +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +static const Event::EventSet Left2PaddlesEvents = { + // Only fire buttons supported by QuadTari + Event::PaddleFourFire, Event::PaddleFiveFire +}; // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - static const Event::EventSet RightPaddlesEvents = { Event::PaddleTwoDecrease, Event::PaddleTwoIncrease, Event::PaddleTwoAnalog, Event::PaddleTwoFire, Event::PaddleThreeDecrease, Event::PaddleThreeIncrease, Event::PaddleThreeAnalog, Event::PaddleThreeFire, }; +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +static const Event::EventSet Right2PaddlesEvents = { + // Only fire buttons supported by QuadTari + Event::PaddleSixFire, Event::PaddleSevenFire +}; // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - static const Event::EventSet LeftKeypadEvents = { diff --git a/src/emucore/EventHandler.cxx b/src/emucore/EventHandler.cxx index 84452f4d2..8380b25b3 100644 --- a/src/emucore/EventHandler.cxx +++ b/src/emucore/EventHandler.cxx @@ -3110,6 +3110,11 @@ EventHandler::EmulActionList EventHandler::ourEmulActionList = { { { Event::PaddleThreeDecrease, "Paddle 3 Turn Right", "" }, { Event::PaddleThreeFire, "Paddle 3 Fire", "" }, + { Event::PaddleFourFire, "Paddle 4 Fire", "" }, + { Event::PaddleFiveFire, "Paddle 5 Fire", "" }, + { Event::PaddleSixFire, "Paddle 6 Fire", "" }, + { Event::PaddleSevenFire, "Paddle 7 Fire", "" }, + { Event::KeyboardZero1, "P0 Keyboard 1", "" }, { Event::KeyboardZero2, "P0 Keyboard 2", "" }, { Event::KeyboardZero3, "P0 Keyboard 3", "" }, @@ -3378,6 +3383,7 @@ const Event::EventSet EventHandler::PaddlesEvents = { Event::PaddleOneDecrease, Event::PaddleOneIncrease, Event::PaddleOneAnalog, Event::PaddleOneFire, Event::PaddleTwoDecrease, Event::PaddleTwoIncrease, Event::PaddleTwoAnalog, Event::PaddleTwoFire, Event::PaddleThreeDecrease, Event::PaddleThreeIncrease, Event::PaddleThreeAnalog, Event::PaddleThreeFire, + Event::PaddleFourFire, Event::PaddleFiveFire,Event::PaddleSixFire,Event::PaddleSevenFire, }; const Event::EventSet EventHandler::KeyboardEvents = { diff --git a/src/emucore/EventHandler.hxx b/src/emucore/EventHandler.hxx index 5c92ef188..8b0c94fb5 100644 --- a/src/emucore/EventHandler.hxx +++ b/src/emucore/EventHandler.hxx @@ -217,8 +217,9 @@ class EventHandler /** Enable controller specific keyboard event mappings. */ - void defineKeyControllerMappings(const Controller::Type type, Controller::Jack port) { - myPKeyHandler->defineControllerMappings(type, port); + void defineKeyControllerMappings(const Controller::Type type, Controller::Jack port, + const string& md5) { + myPKeyHandler->defineControllerMappings(type, port, md5); } /** @@ -644,7 +645,7 @@ class EventHandler #else REFRESH_SIZE = 0, #endif - EMUL_ACTIONLIST_SIZE = 207 + PNG_SIZE + COMBO_SIZE + REFRESH_SIZE, + EMUL_ACTIONLIST_SIZE = 211 + PNG_SIZE + COMBO_SIZE + REFRESH_SIZE, MENU_ACTIONLIST_SIZE = 18 ; diff --git a/src/emucore/Paddles.cxx b/src/emucore/Paddles.cxx index bf524aa13..f247d3995 100644 --- a/src/emucore/Paddles.cxx +++ b/src/emucore/Paddles.cxx @@ -22,7 +22,7 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Paddles::Paddles(Jack jack, const Event& event, const System& system, - bool swappaddle, bool swapaxis, bool swapdir) + bool swappaddle, bool swapaxis, bool swapdir, bool altmap) : Controller(jack, event, system, Controller::Type::Paddles) { // We must start with minimum resistance; see commit @@ -47,31 +47,57 @@ Paddles::Paddles(Jack jack, const Event& event, const System& system, // Consider whether this is the left or right port if(myJack == Jack::Left) { - // First paddle is 0, second is 1 - myP0AxisValue = Event::PaddleZeroAnalog; - myP1AxisValue = Event::PaddleOneAnalog; - myP0FireEvent = Event::PaddleZeroFire; - myP1FireEvent = Event::PaddleOneFire; + if(!altmap) + { + // First paddle is 0, second is 1 + myP0AxisValue = Event::PaddleZeroAnalog; + myP1AxisValue = Event::PaddleOneAnalog; + myP0FireEvent = Event::PaddleZeroFire; + myP1FireEvent = Event::PaddleOneFire; - // These can be affected by changes in axis orientation - myP0DecEvent = Event::PaddleZeroDecrease; - myP0IncEvent = Event::PaddleZeroIncrease; - myP1DecEvent = Event::PaddleOneDecrease; - myP1IncEvent = Event::PaddleOneIncrease; + // These can be affected by changes in axis orientation + myP0DecEvent = Event::PaddleZeroDecrease; + myP0IncEvent = Event::PaddleZeroIncrease; + myP1DecEvent = Event::PaddleOneDecrease; + myP1IncEvent = Event::PaddleOneIncrease; + } + else + { + // First paddle is 4, second is 5 (fire buttons only) + myP0FireEvent = Event::PaddleFourFire; + myP1FireEvent = Event::PaddleFiveFire; + + myP0AxisValue = myP1AxisValue = + myP0DecEvent = myP0IncEvent = + myP1DecEvent = myP1IncEvent = Event::NoType; + } } else // Jack is right port { - // First paddle is 2, second is 3 - myP0AxisValue = Event::PaddleTwoAnalog; - myP1AxisValue = Event::PaddleThreeAnalog; - myP0FireEvent = Event::PaddleTwoFire; - myP1FireEvent = Event::PaddleThreeFire; + if(!altmap) + { + // First paddle is 2, second is 3 + myP0AxisValue = Event::PaddleTwoAnalog; + myP1AxisValue = Event::PaddleThreeAnalog; + myP0FireEvent = Event::PaddleTwoFire; + myP1FireEvent = Event::PaddleThreeFire; - // These can be affected by changes in axis orientation - myP0DecEvent = Event::PaddleTwoDecrease; - myP0IncEvent = Event::PaddleTwoIncrease; - myP1DecEvent = Event::PaddleThreeDecrease; - myP1IncEvent = Event::PaddleThreeIncrease; + // These can be affected by changes in axis orientation + myP0DecEvent = Event::PaddleTwoDecrease; + myP0IncEvent = Event::PaddleTwoIncrease; + myP1DecEvent = Event::PaddleThreeDecrease; + myP1IncEvent = Event::PaddleThreeIncrease; + } + else + { + // First paddle is 6, second is 7 (fire buttons only) + myP0FireEvent = Event::PaddleSixFire; + myP1FireEvent = Event::PaddleSevenFire; + + myP0AxisValue = myP1AxisValue = + myP0DecEvent = myP0IncEvent = + myP1DecEvent = myP1IncEvent = Event::NoType; + } } // Some games swap the paddles diff --git a/src/emucore/Paddles.hxx b/src/emucore/Paddles.hxx index ea77de6ad..f1e645c98 100644 --- a/src/emucore/Paddles.hxx +++ b/src/emucore/Paddles.hxx @@ -44,7 +44,7 @@ class Paddles : public Controller resistance to decrease instead of increase) */ Paddles(Jack jack, const Event& event, const System& system, - bool swappaddle, bool swapaxis, bool swapdir); + bool swappaddle, bool swapaxis, bool swapdir, bool altmap = false); ~Paddles() override = default; public: diff --git a/src/emucore/QuadTari.cxx b/src/emucore/QuadTari.cxx index afafb3fdd..c0303d6be 100644 --- a/src/emucore/QuadTari.cxx +++ b/src/emucore/QuadTari.cxx @@ -82,7 +82,8 @@ unique_ptr QuadTari::addController(const Controller::Type type, bool // Check if we should swap the paddles plugged into a jack bool swapPaddles = myProperties.get(PropType::Controller_SwapPaddles) == "YES"; - return make_unique(myJack, myEvent, mySystem, swapPaddles, false, false); + return make_unique(myJack, myEvent, mySystem, swapPaddles, + false, false, second); } case Controller::Type::Driving: return make_unique(myJack, myEvent, mySystem, second); diff --git a/src/emucore/QuadTari.hxx b/src/emucore/QuadTari.hxx index 91d07a36b..26080ba0e 100644 --- a/src/emucore/QuadTari.hxx +++ b/src/emucore/QuadTari.hxx @@ -24,6 +24,13 @@ class Event; /** The QuadTari controller. + Supported controllers: + - Joystick + - Driving + - Paddles (buttons only) + - AtariVox + - SaveKey + @author Thomas Jentzsch */ class QuadTari : public Controller