diff --git a/src/common/JoyMap.hxx b/src/common/JoyMap.hxx index d38cc8712..92c25ec0c 100644 --- a/src/common/JoyMap.hxx +++ b/src/common/JoyMap.hxx @@ -129,10 +129,10 @@ class JoyMap size_t operator()(const JoyMapping& m)const { return std::hash()((static_cast(m.mode)) // 3 bits + ((static_cast(m.button)) * 7) // 3 bits - + (((static_cast(m.axis)) << 0) // 2 bits - | ((static_cast(m.adir)) << 2) // 2 bits - | ((static_cast(m.hat )) << 4) // 1 bit - | ((static_cast(m.hdir)) << 5) // 2 bits + + (((static_cast(m.axis)) << 0) // 3 bits + | ((static_cast(m.adir)) << 3) // 2 bits + | ((static_cast(m.hat )) << 5) // 1 bit + | ((static_cast(m.hdir)) << 6) // 2 bits ) * 61 ); } diff --git a/src/common/jsonDefinitions.hxx b/src/common/jsonDefinitions.hxx index b7ca9343c..5bea6239f 100644 --- a/src/common/jsonDefinitions.hxx +++ b/src/common/jsonDefinitions.hxx @@ -31,7 +31,11 @@ NLOHMANN_JSON_SERIALIZE_ENUM(JoyAxis, { {JoyAxis::X, "x"}, {JoyAxis::Y, "y"}, {JoyAxis::Z, "z"}, - {JoyAxis::A3, "a3"} + {JoyAxis::A3, "a3"}, + {JoyAxis::A4, "a4"}, + {JoyAxis::A5, "a5"}, + {JoyAxis::A6, "a6"}, + {JoyAxis::A7, "a7"} }) NLOHMANN_JSON_SERIALIZE_ENUM(JoyDir, { diff --git a/src/emucore/EventHandlerConstants.hxx b/src/emucore/EventHandlerConstants.hxx index bf9967785..adf320276 100644 --- a/src/emucore/EventHandlerConstants.hxx +++ b/src/emucore/EventHandlerConstants.hxx @@ -52,6 +52,10 @@ enum class JoyAxis: Int8 { Y = 1, // since they'll be used as array indices Z = 2, A3 = 3, + A4 = 4, + A5 = 5, + A6 = 6, + A7 = 7, NONE = JOY_CTRL_NONE };