diff --git a/src/common/EventHandlerSDL2.cxx b/src/common/EventHandlerSDL2.cxx index aaf7fa009..c5e869dff 100644 --- a/src/common/EventHandlerSDL2.cxx +++ b/src/common/EventHandlerSDL2.cxx @@ -262,12 +262,8 @@ EventHandlerSDL2::JoystickSDL2::JoystickSDL2(int idx) const char* sdlname = SDL_JoystickName(myStick); const string& desc = BSPF::startsWithIgnoreCase(sdlname, "XInput Controller") ? "XInput Controller" : sdlname; - const SDL_JoystickGUID sdlguid = SDL_JoystickGetDeviceGUID(idx); - char chGuid[33]; - SDL_JoystickGetGUIDString(sdlguid, chGuid, sizeof(chGuid)); - - initialize(SDL_JoystickInstanceID(myStick), desc, chGuid, + initialize(SDL_JoystickInstanceID(myStick), desc, SDL_JoystickNumAxes(myStick), SDL_JoystickNumButtons(myStick), SDL_JoystickNumHats(myStick), SDL_JoystickNumBalls(myStick)); } diff --git a/src/common/PJoystickHandler.cxx b/src/common/PJoystickHandler.cxx index bc78e17a7..103aa05db 100644 --- a/src/common/PJoystickHandler.cxx +++ b/src/common/PJoystickHandler.cxx @@ -24,9 +24,8 @@ #include "Driving.hxx" #include "Settings.hxx" #include "EventHandler.hxx" -#include "Logger.hxx" -#include "MD5.hxx" #include "PJoystickHandler.hxx" +#include "Logger.hxx" #ifdef GUI_SUPPORT #include "DialogContainer.hxx" @@ -139,7 +138,6 @@ int PhysicalJoystickHandler::add(const PhysicalJoystickPtr& stick) } stick->type = PhysicalJoystick::Type::REGULAR; } - stick->name.append(" (" + MD5::hash(stick->guid).substr(0, 4) + ")"); // The stick *must* be inserted here, since it may be used below mySticks[stick->ID] = stick; @@ -296,9 +294,9 @@ void PhysicalJoystickHandler::mapStelladaptors(const string& saport) if(found) { if(saOrder[saCount] == 1) - _stick->name += " (emulates left controller port)"; + _stick->name += " (emulates left joystick port)"; else if(saOrder[saCount] == 2) - _stick->name += " (emulates right controller port)"; + _stick->name += " (emulates right joystick port)"; saCount++; // always map Stelladaptor/2600-daptor to emulation mode defaults diff --git a/src/common/PhysicalJoystick.cxx b/src/common/PhysicalJoystick.cxx index c15251fae..6770a6356 100644 --- a/src/common/PhysicalJoystick.cxx +++ b/src/common/PhysicalJoystick.cxx @@ -42,13 +42,11 @@ namespace { } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -void PhysicalJoystick::initialize(int index, - const string& desc, const string& uid, - int axes, int buttons, int hats, int /*balls*/) +void PhysicalJoystick::initialize(int index, const string& desc, + int axes, int buttons, int hats, int /*balls*/) { ID = index; name = desc; - guid = uid; numAxes = axes; numButtons = buttons; diff --git a/src/common/PhysicalJoystick.hxx b/src/common/PhysicalJoystick.hxx index c4297643b..87dce3f01 100644 --- a/src/common/PhysicalJoystick.hxx +++ b/src/common/PhysicalJoystick.hxx @@ -55,7 +55,7 @@ class PhysicalJoystick string about() const; protected: - void initialize(int index, const string& desc, const string& uid, + void initialize(int index, const string& desc, int axes, int buttons, int hats, int balls); private: @@ -68,7 +68,6 @@ class PhysicalJoystick Type type{Type::REGULAR}; int ID{-1}; string name{"None"}; - string guid{"None"}; int numAxes{0}, numButtons{0}, numHats{0}; IntArray axisLastValue; IntArray buttonLast;