summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/input
Commit message (Collapse)AuthorAgeFilesLines
* -A few incremental UI code improvements: Vas Crabb2021-03-122-25/+13
| | | | | | | | | * Simplified message when toggling UI controls. * Show actual configured UI toggle key, not misleading hard-coded text. * Push window activated/deactivated events to UI manager. * Simplified SDL window event handling code - events are pretty precise. -Miscellaneous code cleanup.
* Eliminate ARRAY_LENGTH template in favor of C++17's std::size AJR2021-02-149-17/+17
| | | | | | | | | | * osdcomm.h: Move definition of EQUIVALENT_ARRAY to coretmpl.h * sharc.cpp, gt64xxx.cpp, ym2413.cpp, gb_lcd.cpp, snes_ppu.cpp: Use STRUCT_MEMBER for save state registration * gio/newport.cpp, megadrive/svp.cpp, nes_ctrl/bcbattle.cpp, arm7.cpp, tms9995.cpp, pckeybrd.cpp, sa1110.cpp, sa1111.cpp, jangou_blitter.cpp, vic4567.cpp: Use std::fill(_n) instead of memset * emucore.h: Remove obsolete typedef
* Tidy up loose ends: Vas Crabb2021-01-061-2/+2
| | | | | | | | * Fixed a couple of fixed-size buffers in Windows OSD code. * Marked MAME as aware of long paths in Windows manifest. * Made a cleaner, thread-safe API for getting volume names. * Added compile-time option to disable recompiler W^X mode. * NuBus image device current directory doesn't need to be pinned.
* Add "Non-Integer Scaling" and "Keep Aspect" settings to UI video options ↵ AJR2020-12-171-10/+0
| | | | menu and remove SDL hotkeys for same
* unicode.h: Updates AJR2020-12-151-0/+1
| | | | | - Remove from emu.h (except for UTF8_xxx macros, which have been transplanted to emucore.h since a lot of drivers use them) and osdepend.h - Add std::string_view overrides for uchar_from_utf8 and normalize_unicode
* Fix most implicit fallthrough warnings from clang Vas Crabb2020-11-171-1/+1
|
* osd/modules/input: Fixed a couple of X11 resource leaks. Vas Crabb2020-11-161-18/+33
|
* -bus/a2bus: Added Apple II Parallel Printer Interface Card. Vas Crabb2020-11-012-165/+144
| | | | | | -frontend/mame/audit.cpp: Fixed another annoying edge case. -Cleaned up RawInput code slightly.
* fixed some modernize-use-auto clang-tidy warnings (nw) (#6238) Oliver Stöneberg2020-01-303-8/+8
|
* fix build with clang 9.0.0 on windows smf-2020-01-241-1/+1
| | | | | | ../../../../../src/osd/modules/input/input_winhybrid.cpp:107:16: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces] : m_variant({0})
* use C++ library includes (nw) firewave2020-01-224-8/+8
|
* input_sdl: Process control characters so that the natural keyboard can see ↵ AJR2020-01-101-0/+13
| | | | | | them (SDL normally strips these out) Don't strip linefeed characters (Ctrl-J) from natural keyboard input except when pasting strings
* input_sdl.cpp: Ignore joystick buttons beyond maximum supported number. Vas Crabb2019-12-071-2/+5
| | | | * Note that the code to map excess buttons to switches doesn't actually do anything useful while INPUT_MAX_BUTTONS and MAX_BUTTONS happen to be defined to the same number.
* UI input menu: treat codes containing a postive and negative of the same ↵ Vas Crabb2019-11-213-3/+3
| | | | | | | | thing as invalid (e.g. A S not A) ioport.cpp: * better than 50% reduction in compile time, and better locality for static data * better encapsulation, const correctness and noexcept usage
* SDL: recognize GUIDs for joysticks, allows stable input ID mapping [R. Belmont] arbee2019-11-171-5/+13
|
* Check that m_display is not null to prevent crash (#5725) George McMullen2019-10-151-4/+20
| | | | | | | | | | | | | | | | | | | | * Check that m_display is not null to prevent crash https://mametesters.org/view.php?id=7372 * Probe method to check if X11 is actually being used As per: https://github.com/mamedev/mame/pull/5725#issuecomment-540004475 this will help MAME verify X11 has no inputs when X11 is not actually being used (e.g. on RetroPie where SDL display is RPI). * Fix issue where a lightgun with no name would return nullptr As suggested by https://github.com/mamedev/mame/pull/5725#issuecomment-539914514 , a bug in create_lightgun_device() returned nullptr if the lightgun had no name. Now it will create the device with a name using the lightgun's device index * Change older m_display change to assert This module can now be probed and disabled correctly if X11 is not being used. Removed the if statements that would be called every cycle (and fail silently) in favor of asserts, as MAME does not currently handle dynamic hardware configuration changes. * Fixing semicolons in asserts that were ifs
* Make osd_printf_* use util/strformat semantics. Vas Crabb2019-09-262-3/+3
| | | | | | | | | | | | | | | | | (nw) This has been a long time coming but it's here at last. It should be easier now that logerror, popmessage and osd_printf_* behave like string_format and stream_format. Remember the differences from printf: * Any object with a stream out operator works with %s * %d, %i, %o, %x, %X, etc. work out the size by magic * No sign extending promotion to int for short/char * No widening/narrowing conversions for characters/strings * Same rules on all platforms, insulated from C runtime library * No format warnings from compiler * Assert in debug builds if number of arguments doesn't match format (nw) Also removed a pile of redundant c_str and string_format, and some workarounds for not being able to portably format 64-bit integers or long long.
* OSD_MAC: don't run MAME on a thread, it upsets the debugger very much (nw) arbee2019-09-171-0/+3
|
* A few files that got missed (nw) arbee2019-09-151-0/+55
|
* Creating an -attach_window command line parameter on Windows to attach to an ↵ npwoods2019-08-043-8/+41
| | | | | | | | | | | | | | existing window (#5381) * Creating an -attach_window command line parameter on Windows to attach to an existing window * Moved -attach_window option to Windows-specific code * Created an osd_set_aggressive_input_focus() function and exposed to LUA * Created a dummy implementation of osd_set_aggressive_input_focus() for SDL
* Linux X11 Input: Fix multiple lightgun support Kiall Mac Innes2019-04-051-2/+26
| | | | | | | On X11 Linux, every lightgun event was passed onto every lightgun device within MAME. This obviously works for 1 gun, but with 2, it causes both crosshairs to move in the same direction at the same time.
* Merge pull request #4698 from kiall/bug-4695 R. Belmont2019-03-011-1/+17
|\ | | | | Linux X11 Input: Fix lightgun support
| * Linux X11 Input: Fix lightgun support Kiall Mac Innes2019-02-281-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SDL/X11 number mouse/lighgun buttons 1,2,3, while windows and other parts of MAME like offscreen_reload expect 0,2,1. Transpose buttons 2 and 3, and then -1 the button number to align the numbering schemes. This fixes lightgun support on Linux - tested with an Ultimarc AimTrak and the following config: lightgun 1 lightgun_device lightgun lightgunprovider x11 lightgun_index1 "Ultimarc Ultimarc" offscreen_reload 1 Note: MAME must be compiled with XInput support: make -j10 NO_USE_XINPUT=0 Fixes bug #4695
* | srcclean (nw) Vas Crabb2019-02-241-257/+257
| |
* | Fixed sdl2 keymap processing. [Couriersud] couriersud2019-02-163-43/+280
|/ | | | | | | | | | Keymaps must have been broken for ages: - It is now possible to map every scancode SDL2 defines. - Removed keycode field. This was a leftover from SDL1.x - Fixed bug preventing keymaps from working. - Fixed the DE keymap. - Converted other keymaps to new format and added a comment that they have to be reviewed and fixed.
* Keep track of which SDL input subsystems were initialized (nw) Justin Kerk2019-01-011-4/+16
|
* Better Emscripten SDL fix (nw) Justin Kerk2018-12-311-4/+5
|
* Fix joystick initialization with Emscripten SDL [Justin Kerk] Justin Kerk2018-12-301-0/+4
|
* nothing to see here (nw) arbee2018-11-031-2/+17
|
* Fix debug assert failure when using SDL fullscreen toggle (nw) AJR2018-08-061-1/+2
|
* Make "Keypad ," and "Keypad =" standard keys AJR2018-05-111-0/+2
|
* Remove all uses of first_screen() from core files, nw Ryan Holtz2018-03-111-2/+7
|
* Rationale (nw) AJR2017-10-301-0/+1
|
* Make SDL input less eager to generate double-click events when mouse doesn't ↵ AJR2017-10-301-1/+1
| | | | move between clicks
* input: make xinput analog triggers half-axes and default IPT_PEDAL2 to RZ- ↵ hap2017-10-172-12/+12
| | | | 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-132-5/+13
| | | | | | | | 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-132-13/+5
| | | | Axis+Z Rotation where the axis resting position was at the middle of the trigger (nw)
* Don't process every character individually when searching - this reduces Vas Crabb2017-08-101-1/+1
| | | | | | lag if you keep typing while a big list is searched. (nw) patch up German translation
* Compile testing anybody? (nw) Olivier Galibert2017-02-271-4/+2
|
* Some reports of garbage in console with DInput controllers. Brad Hughes2017-02-271-2/+7
| | | | Change to snprintf with assert since apparently snprintf fixes the reported problem.
* UWP: Fix alt key input (nw) Brad Hughes2017-01-111-1/+15
|
* Move special windows.h include directives to build defines (nw) Brad Hughes2016-12-288-21/+1
|
* srcclean (nw) Vas Crabb2016-11-272-27/+27
|
* Fix key names with -keyboardprovider win32 Vas Crabb2016-11-251-4/+8
|
* UWP: keyboard scancodes start at 1 (nw) Brad Hughes2016-11-171-2/+6
| | | | Also thread synchronization which will be needed later when we have multiple windows (nw)
* Change window handle storage to template instead of void* (nw) (#1725) Brad Hughes2016-11-175-13/+13
| | | | * Change window handle storage to template instead of void* (nw)
* UWP: Missing gamepad reset caused control sticking (nw) Brad Hughes2016-11-151-0/+5
|
* UWP: Hotkeys for gamepad plus more time for gamepad discovery (nw) Brad Hughes2016-11-152-3/+37
|
* UWP: Better keyboard key names (nw) Brad Hughes2016-11-153-14/+15
|
* UWP: Enable gamepad support and update keyboard support (nw) Brad Hughes2016-11-143-72/+529
|