diff --git a/docs/source/luascript/ref-input.rst b/docs/source/luascript/ref-input.rst index 6adb684bc27a3..840e0a3ff5f2a 100644 --- a/docs/source/luascript/ref-input.rst +++ b/docs/source/luascript/ref-input.rst @@ -339,9 +339,6 @@ field.cocktail (read-only) field.toggle (read-only) A Boolean indicating whether the field corresponds to a hardware toggle switch or push-on, push-off button. -field.rotated (read-only) - A Boolean indicating whether the field corresponds to a control that is - rotated relative its standard orientation. field.analog_reverse (read-only) A Boolean indicating whether the field corresponds to an analog control that increases in the opposite direction to the convention (e.g. larger values diff --git a/src/emu/inputdev.cpp b/src/emu/inputdev.cpp index a9caaf7788d5b..0cbe0d58ceb30 100644 --- a/src/emu/inputdev.cpp +++ b/src/emu/inputdev.cpp @@ -107,7 +107,7 @@ class input_device_absolute_item : public input_device_item // standard joystick mappings const char input_class_joystick::map_8way[] = "7778...4445"; -const char input_class_joystick::map_4way_diagonal[] = "4444s8888..444458888.444555888.ss5.222555666.222256666.2222s6666.2222s6666"; +// const char input_class_joystick::map_4way_diagonal[] = "4444s8888..444458888.444555888.ss5.222555666.222256666.2222s6666.2222s6666"; // const char input_class_joystick::map_4way_sticky[] = "s8.4s8.44s8.4445"; @@ -669,28 +669,6 @@ input_class_joystick::input_class_joystick(input_manager &manager) } -//------------------------------------------------- -// set_global_joystick_map - set the map for all -// joysticks -//------------------------------------------------- - -bool input_class_joystick::set_global_joystick_map(const char *mapstring) -{ - // parse the map - joystick_map map; - if (!map.parse(mapstring)) - return false; - - osd_printf_verbose("Input: Changing default joystick map = %s\n", map.to_string()); - - // iterate over joysticks and set the map - for (int joynum = 0; joynum <= maxindex(); joynum++) - if (device(joynum) != nullptr) - downcast(*device(joynum)).set_joystick_map(map); - return true; -} - - //************************************************************************** // INPUT DEVICE ITEM //************************************************************************** diff --git a/src/emu/inputdev.h b/src/emu/inputdev.h index 8e914094610c6..f40320183b814 100644 --- a/src/emu/inputdev.h +++ b/src/emu/inputdev.h @@ -380,12 +380,8 @@ class input_class_joystick : public input_class // construction/destruction input_class_joystick(input_manager &manager); - // misc - bool set_global_joystick_map(const char *mapstring); - // standard joystick maps static const char map_8way[]; - static const char map_4way_diagonal[]; protected: // specific overrides diff --git a/src/emu/ioport.cpp b/src/emu/ioport.cpp index b681fd3b6a958..8c4cd18e8c2cb 100644 --- a/src/emu/ioport.cpp +++ b/src/emu/ioport.cpp @@ -1871,18 +1871,6 @@ time_t ioport_manager::initialize() init_autoselect_devices({ IPT_TRACKBALL_X, IPT_TRACKBALL_Y }, OPTION_TRACKBALL_DEVICE, "trackball"); init_autoselect_devices({ IPT_MOUSE_X, IPT_MOUSE_Y }, OPTION_MOUSE_DEVICE, "mouse"); - // look for 4-way diagonal joysticks and change the default map if we find any - const char *joystick_map_default = machine().options().joystick_map(); - if (joystick_map_default[0] == 0 || strcmp(joystick_map_default, "auto") == 0) - for (auto &port : m_portlist) - for (ioport_field const &field : port.second->fields()) - if (field.live().joystick != nullptr && field.rotated()) - { - input_class_joystick &devclass = downcast(machine().input().device_class(DEVICE_CLASS_JOYSTICK)); - devclass.set_global_joystick_map(input_class_joystick::map_4way_diagonal); - break; - } - // register callbacks for when we load configurations machine().configuration().config_register( "input", diff --git a/src/emu/ioport.h b/src/emu/ioport.h index 179a58772c089..add74d22c9b87 100644 --- a/src/emu/ioport.h +++ b/src/emu/ioport.h @@ -561,11 +561,10 @@ class ioport_field // flags for ioport_fields static inline constexpr u32 FIELD_FLAG_COCKTAIL = 0x0001; // set if this field is relevant only for cocktail cabinets static inline constexpr u32 FIELD_FLAG_TOGGLE = 0x0002; // set if this field should behave as a toggle - static inline constexpr u32 FIELD_FLAG_ROTATED = 0x0004; // set if this field represents a rotated control - static inline constexpr u32 ANALOG_FLAG_REVERSE = 0x0008; // analog only: reverse the sense of the axis - static inline constexpr u32 ANALOG_FLAG_RESET = 0x0010; // analog only: always preload in->default for relative axes, returning only deltas - static inline constexpr u32 ANALOG_FLAG_WRAPS = 0x0020; // analog only: positional count wraps around - static inline constexpr u32 ANALOG_FLAG_INVERT = 0x0040; // analog only: bitwise invert bits + static inline constexpr u32 ANALOG_FLAG_REVERSE = 0x0004; // analog only: reverse the sense of the axis + static inline constexpr u32 ANALOG_FLAG_RESET = 0x0008; // analog only: always preload in->default for relative axes, returning only deltas + static inline constexpr u32 ANALOG_FLAG_WRAPS = 0x0010; // analog only: positional count wraps around + static inline constexpr u32 ANALOG_FLAG_INVERT = 0x0020; // analog only: bitwise invert bits public: // construction/destruction @@ -594,7 +593,6 @@ class ioport_field bool cocktail() const { return ((m_flags & FIELD_FLAG_COCKTAIL) != 0); } bool toggle() const { return ((m_flags & FIELD_FLAG_TOGGLE) != 0); } - bool rotated() const { return ((m_flags & FIELD_FLAG_ROTATED) != 0); } bool analog_reverse() const { return ((m_flags & ANALOG_FLAG_REVERSE) != 0); } bool analog_reset() const { return ((m_flags & ANALOG_FLAG_RESET) != 0); } bool analog_wraps() const { return ((m_flags & ANALOG_FLAG_WRAPS) != 0); } @@ -1049,7 +1047,6 @@ class ioport_configurer ioport_configurer& field_add_char(std::initializer_list charlist); ioport_configurer& field_add_code(input_seq_type which, input_code code); ioport_configurer& field_set_way(int way) { m_curfield->m_way = way; return *this; } - ioport_configurer& field_set_rotated() { m_curfield->m_flags |= ioport_field::FIELD_FLAG_ROTATED; return *this; } ioport_configurer& field_set_name(const char *name) { assert(m_curfield != nullptr); m_curfield->m_name = string_from_token(name); return *this; } ioport_configurer& field_set_player(int player) { m_curfield->m_player = player - 1; return *this; } ioport_configurer& field_set_cocktail() { m_curfield->m_flags |= ioport_field::FIELD_FLAG_COCKTAIL; field_set_player(2); return *this; } @@ -1176,9 +1173,6 @@ ATTR_COLD void INPUT_PORTS_NAME(_name)(device_t &owner, ioport_list &portlist, s #define PORT_16WAY \ configurer.field_set_way(16); -#define PORT_ROTATED \ - configurer.field_set_rotated(); - // general flags #define PORT_NAME(_name) \ configurer.field_set_name(_name); diff --git a/src/frontend/mame/luaengine_input.cpp b/src/frontend/mame/luaengine_input.cpp index a8e509936bb8b..fb5003f7c9941 100644 --- a/src/frontend/mame/luaengine_input.cpp +++ b/src/frontend/mame/luaengine_input.cpp @@ -357,7 +357,6 @@ void lua_engine::initialize_input(sol::table &emu) ioport_field_type["enabled"] = sol::property(&ioport_field::enabled); ioport_field_type["cocktail"] = sol::property(&ioport_field::cocktail); ioport_field_type["toggle"] = sol::property(&ioport_field::toggle); - ioport_field_type["rotated"] = sol::property(&ioport_field::rotated); ioport_field_type["analog_reverse"] = sol::property(&ioport_field::analog_reverse); ioport_field_type["analog_reset"] = sol::property(&ioport_field::analog_reset); ioport_field_type["analog_wraps"] = sol::property(&ioport_field::analog_wraps);