summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/input/input_x11.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Eliminate ARRAY_LENGTH template in favor of C++17's std::size AJR2021-02-141-2/+2
| | | | | | | | | | * 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
* osd/modules/input: Fixed a couple of X11 resource leaks. Vas Crabb2020-11-161-18/+33
|
* use C++ library includes (nw) firewave2020-01-221-2/+2
|
* 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-261-2/+2
| | | | | | | | | | | | | | | | | (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.
* 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.
* 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
* NOTICE (TYPE NAME CONSOLIDATION) Miodrag Milanovic2016-10-221-4/+4
| | | | | Use standard uint64_t, uint32_t, uint16_t or uint8_t instead of UINT64, UINT32, UINT16 or UINT8 also use standard int64_t, int32_t, int16_t or int8_t instead of INT64, INT32, INT16 or INT8
* Adding id() property to input_device Tomer Verona2016-09-201-6/+6
| | | | | | | | | | | | 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.
* Put back accidentally replaced conditional compile directive (nw) Brad Hughes2016-08-221-1/+1
|
* cleanup missed x11 input module (nw) Brad Hughes2016-08-221-30/+31
|
* Cleanups and version bump Miodrag Milanovic2016-07-271-1/+1
|
* Fix input issues on big endian systems (fixes #963) Brad Hughes2016-06-291-5/+5
|
* Various cleanups suggested by static analyzer (nw) Miodrag Milanovic2016-04-241-2/+2
|
* Cleanups and version bump Miodrag Milanovic2016-03-301-100/+100
|
* Fix build break for X11 input Brad Hughes2016-03-191-1/+1
|
* Refactor OSD input into modules Brad Hughes2016-02-281-0/+605