summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/input/input_xinput.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* osd: Fixed a corner case in XInput DJ Hero turntable handling. Vas Crabb2023-02-251-20/+14
|
* Update accumulating relative inputs exactly once per frame. Vas Crabb2023-02-241-16/+22
| | | | | | | | | | | | | This fixes "amplification" effects that would happen if the frame rate rose above 100 Hz (whether by unthrottling or otherwise). Synchronise with wall clock any time inputs are read. Not doing this has weird effects on relative inputs with frame skipping and contributes to unresponsiveness of menus. Reduce visual latency for mouse movement on menus when paused or skipping frames. The rest of the code changes to menus won't provide benefits until draw can happen after event handling.
* Input refactoring: Vas Crabb2023-02-181-102/+1346
| | | | | | | | | | | | | | | | | | | | | | | | | | osd/modules/input, emu/inpttype.cpp: Made most default joystick assignments supplied by input modules. Input modules take available controls into consideration when generating default assignments. emu/inpttype.ipp: Added a separate "Back" UI input separate from Cancel. You may want an easier to hit combination for moving to the previous menu than for exiting or cancelling input. They both default to Escape. emu/inpttype.ipp: Added a UI Help control. Currently only used by analog inputs menu emu/inpttype.h: Moved I/O port field type enum to its own header and sorted UI controls so they appear in a more logical order. ui: Don't use UI Select to restore defaults - people should be getting used to the UI Clear input by now. UI Select cycles multi-value items instead. ui/inputmap.cpp: Don't use immediate cancel to cycle between clearing and restoring default assignment (use UI Clear instead). osd: Reduced the number of files needing to include the dreaded emu.h. Got some implementation out of headers.
* Small batch of input refactoring: Vas Crabb2023-02-051-2/+35
| | | | | | | | | | | | | | | | | | | | | emu/input.cpp: Fixed regression in display of some joystick inputs. osd/interface: Split up interface classes into a few more files to reduce where the input device interface class needs to be included. Made OSD independent of concrete input_device class. osd/modules/input, emu/inputdev.cpp, emu/ioport.cpp: Allow input devices to provide tokens for controls without standard item types and additional default input assignments. Fixes issues assigning Yen and Backslash on Japanese keyboards. ui/textbox.cpp: Added a fixed-content text box menu class for future use. Got main.h out of emu.h as it’s only used in a very small number of places, mostly for getting the application name. Added eminline.h to attotime.h as it's used without emu.h. Cleaned up forward declarations in emufwd.h a little.
* Use EQUIVALENT_ARRAY to avoid issues with std::size on member arrays, enable ↵ Vas Crabb2023-02-011-6/+3
| | | | warnings for VLAs in C++.
* Various input and OSD refactoring: Vas Crabb2023-01-291-139/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | osd: Supply OSD object to modules on initialisation. Encapsulated some event handling in the OSD objects rather than leaving it in free functions. Put various stuff in namespaces. osd/modules/input: Enabled dinput, xinput and winhybrid modules for Windows SDL builds, and enabled background input for dinput and xinput (and by extension winhybrid) modules. Also fixed some COM and X11 resource leaks. osd/modules/input/input_sdl.cpp: Flipped SDL mouse button order to match Windows, and exposed vertical and horizontal scroll as Z and rZ axes. Moved SDL UI event handling out of input devices into OSD object. osd/modules/input_rawinput.cpp: Changed lightgun Z axis token so it's correctly identified as a relative axis (it maps to the scroll wheel equivalent). osd: Added an option to choose the network provider module. Mostly useful if you build with both TUN/TAP and pcap support included, or if you want to disable emulated networking completely. emu/input.cpp: Use a better strategy for assembling input code names that uses fewer temporary strings and doesn't require use of the non-Unicode-aware space trimming function (fixes MT08552). osd/modules/input_dinput.cpp: Improved polling logic. osd: Made various parts of the input code less dependent on concrete emu objects, and reduced inappropriately passing around the machine object. Made input modules less dependent on OSD implementation. Encapsulated some stuff and got rid of some vestigial newui and SDL1 support code. Cleaned up some interfaces. Moved OSD options classes to their own files. Prepare to remove main.h from emu.h - it's mostly used to get the application name, which the vast majority of emulated devices don't need to do.
* osd: Better scaling factors for XInput DJ Hero turntable dials. [DarkMoS] Vas Crabb2023-01-191-2/+2
|
* osd: Still more XInput rhythm game controller support for Windows: Vas Crabb2023-01-181-59/+304
| | | | | | * Added support for DJ Hero turntable controller. * Added support for Rock Band keyboard controller pedal. * Fixed pickup selector switch on guitar controllers.
* osd: Better XInput rhythm game controller support on Windows: Vas Crabb2023-01-181-54/+335
| | | | | | * Better support for extended controller type information. * Support for velocity sensitive six-drum controller. * Don't ignore button capabilites for keyboard controller.
* osd: Improved XInput guitar support and added XInput Rock Band keyboard support. Vas Crabb2023-01-181-217/+780
|
* osd: Added support for guitar and drum kit controllers via XInput. Vas Crabb2023-01-171-25/+99
|
* osd: Work around another observed invalid XInput capabilities report. Vas Crabb2023-01-151-2/+14
|
* osd: Work around bad XInput capabilities report from Retro-Bit Saturn pad. Vas Crabb2023-01-141-7/+34
|
* osd: Added support for mapping files to sdlgame joystick provider and made ↵ Vas Crabb2023-01-141-3/+25
| | | | | | | | | | | | | | | | | it default with SDL. This changes behaviour, however I think it's a net positive: * Most games using Steam Input or SDL2 to read game controllers have this behaviour, so users have come to expect it. * This module is better at giving meaningful names to buttons on common controller, and assigning axes consistently. * Button/axis mapping files using a widely-used format are supported. * The old behaviour is still available with `-joystickprovider sdljoy` if anyone wants it. The new option for controller mapping files is in the general OSD options rather than SDL options as it can be extended to DirectInput in the future.
* -osd: Better XInput and SDL game controller input enhancements: Vas Crabb2023-01-121-193/+530
| | | | | | | | | | | | | | | * Added initial support for XInput controller subtypes, starting with driving, arcade and flight controllers. * Check XInput capabilities to ignore buttons and hats that aren't present. * Added preliminary SDL Game Controller joystick provider. Reconnection and mixed Game Controller/Joystick devices are unsupported. * Show the input token for the highlighted control on input device menus. -ui: Allow menus to set required space above and below menu when metrics change. Fixes the initial bad layout on the system selecton menu, or bad layout after resizing windows.
* -Input code cleanup: Vas Crabb2023-01-101-11/+24
| | | | | | | | | | | | | * dinput, xinput: Use proper item IDs for hat switches rather than "other switch". * xinput: Map right thumb stick to Z/rZ for consistency with SDL and DirectInput. * xinput: Map triggers to additional absolute axes 1 and 2. * xinput: Map start and back buttons to start and select. * Added default assignments for player 5-10 start/select. * Added default assignments for 5P-8P start and coin 5-8. -namco/namcos2.cpp: Changed collective pitch control to AD Stick Z.
* Fix 9ce44fa048793de5e14d1e7af98e8b5ca148d0f3 for non-Windows builds AJR2022-05-251-0/+2
|
* osd: Cleaned up Windows API usage a little. Vas Crabb2022-05-261-16/+4
| | | | | | | | | * Bumped target windows version to 6.0.0 (Vista). * Use WRL COM pointers to manage some COM-like objects. * Cleaned up logging in DirectSound module. * Cleaned up includes in Windows input modules. * Switched to Common Item Dialogs in Windows debugger. * Replaced disabled code that never really worked with a TODO comment.
* osd/modules/input: Detect joystick reconnection with SDL. (#9605) Vas Crabb2022-04-241-1/+1
| | | Also improved display name scheme for joystick axes and buttons.
* osd/modules/input/input_rawinput.cpp: Allow re-plugging mouse/keyboard. Vas Crabb2022-03-111-6/+6
|
* Remove OSD_UWP from rest of code Miodrag Milanovic2021-10-261-4/+0
|
* Slightly cleaned up OSD input modules. Vas Crabb2021-07-291-68/+130
| | | | | | | | | | Removed support for DirectInput 7 and earlier. It hasn't been tested in years, and it's not relevant on any supported OS. DirectInput is effectively finalised at version 8, and is unlikely to get an API update in the future. Use more string[_view] and fewer C strings, and tightened up scope of a few things.
* input: make xinput analog triggers half-axes and default IPT_PEDAL2 to RZ- ↵ hap2017-10-171-7/+7
| | | | instead of Z+, placing IPT_PEDAL and IPT_PEDAL2 on separate axes. (nw)
* Revert "xinput: the left+right triggers combined are considered the Z Axis, ↵ AJR2017-10-131-3/+10
| | | | | | | | not Z Axis+Z Rotation where the axis resting position was at the middle of the trigger (nw)" The DirectInput Z-axis trigger merger seems more widely considered a bug than a feature, and probably should not be the default MAME behavior. This reverts commit 80a64430a39f306f702766525a093ac1141f7252.
* xinput: the left+right triggers combined are considered the Z Axis, not Z ↵ hap2017-10-131-10/+3
| | | | Axis+Z Rotation where the axis resting position was at the middle of the trigger (nw)
* Move special windows.h include directives to build defines (nw) Brad Hughes2016-12-281-3/+0
|
* Adding id() property to input_device Tomer Verona2016-09-201-3/+3
| | | | | | | | | | | | This change adds id() property to input_device, which represents the unique device id. This allows the osd layer when creating a device to pass a friendly display name along with a unique identifier. Currently the device id is only used to map a physical controller device to controller id, but can be used more generally in the future. For raw input devices, we use the full raw input name as the device id. For all other devices, we fall back to device name as the device id. The "uniqueness" of the device id is not currently enforced in code.
* osd input code cleanup (nw) Brad Hughes2016-08-221-2/+1
|
* std::min and std:max instead of MIN and MAX, also some more macros converted ↵ Miodrag Milanovic2016-07-311-0/+2
| | | | to inline functions (nw)
* Fix input issues on big endian systems (fixes #963) Brad Hughes2016-06-291-5/+5
|
* Cleanup and version bumpmame0175 Miodrag Milanovic2016-06-291-1/+1
|
* Introduce dynamic_module Giuseppe Gorgoglione2016-06-111-34/+12
| | | | | This is a central cross-platform facility to dynamically bind functions from shared libraries. Updated all OSD modules to use it.
* Hybrid Input Module: Change error printing to verbose on probe() and error ↵ Brad Hughes2016-05-311-2/+2
| | | | on init()
* Cleanups and version bumpmame0173 Miodrag Milanovic2016-04-271-1/+1
|
* Fix bug in Xinput DPAD POV mapping. Brad Hughes2016-04-101-1/+1
|
* Correct trigger axis. XInput small code cleanup. Brad Hughes2016-04-091-16/+16
|
* Make XInput triggers centered at 0 Brad Hughes2016-04-061-4/+4
|
* Make Xinput triggers analog Brad Hughes2016-04-061-6/+6
|
* Hybrid DirectInput/XInput module Brad Hughes2016-04-041-252/+154
|
* Cleanups and version bump Miodrag Milanovic2016-03-301-3/+3
|
* General code cleanup in input modules. Using ComPtr to manage DirectInput ↵ Brad Hughes2016-03-181-4/+4
| | | | resources.
* With latest package from MSYS of clang 3.8.0 build at least compile fine on ↵ Miodrag Milanovic2016-03-111-1/+1
| | | | | | windows (nw) Strange crashing while executing
* fix build errors (nw) Jeffrey Clark2016-03-051-1/+1
|
* Simplify xinput dynamic linking Brad Hughes2016-03-021-66/+20
|
* Dynamically load xinput Brad Hughes2016-03-011-4/+141
|
* Add XInput support for Windows OSD Brad Hughes2016-02-291-0/+290