695 Commits

Author SHA1 Message Date
redenvelope2000
7be52caff8
Update input_driver.c to improve the classic toggle turbo function (#17252)
Changed the logic of the classic toggle turbo mode code such that the pressing order of the turbo button and the button to enable/disable does not matter.
2024-12-15 09:23:59 -08:00
Eric Warmenhoven
48f156fefe
Fix uninitialized variable (#17256) 2024-12-13 09:55:38 -08:00
Eric Warmenhoven
cf986c0424
overlay: don't rely on menu entry, it can be misleading (#17247) 2024-12-10 22:32:15 -08:00
Eric Warmenhoven
f83841df38
probably fix crash setting overlay (#17243) 2024-12-09 20:47:29 -08:00
Eric Warmenhoven
99c2676efa
Add option to load overlay based on system name (#17233) 2024-12-07 23:58:33 -08:00
libretroadmin
2809421d4e Revert "static variables are initialized to '0' automatically as per C rules"
This reverts commit 2a0984b6e47b5f714ce4a360afeaadafdb634c36.
2024-11-19 03:03:13 +01:00
libretroadmin
2a0984b6e4 static variables are initialized to '0' automatically as per C rules 2024-11-18 15:33:34 +01:00
sonninnos
c27075d9d6
Ignore other hotkeys with menu toggle (#17165) 2024-11-06 00:19:00 -08:00
Joe Osborn
fbf2c70e0d
replay format extended to support external tools (#17042)
- replays now start each frame with the number of key events (8 bit
unsigned int, then key events) and the number of input events (16 bit
unsigned int, then the input events)
- this makes it possible to parse replay files without any core
loaded, and makes replays more portable if cores change their polling
strategies
- external tools can now parse replay files
- old (vsn 0) replays will still play back, but new (vsn 1) replays
will not play on old RA
- replay files grow faster now, with each input poll now taking 8
bytes instead of 2
2024-10-04 12:47:34 -07:00
Viačasłaŭ
3019b926c2
Fix typos (#17068) 2024-10-01 17:36:33 -07:00
Joe Osborn
abe7d01e74
Report replay frame number for active_replay stdout api (#17039)
This changes the replay movie's frame_ptr (a 20-bit number used to
point to a log of file offsets) into a frame counter, which is masked
against the 20-bit pattern for use in the file offset log but also
functions as a time index into the replay.  Right now that is reported
in `GET_CONFIG_PARAM active_replay` but in the future it could be used
to show how far into the replay we are during playback or how long the
replay is during recording.
2024-09-27 14:37:31 -07:00
zoltanvb
4e063934fd
Add option to disable analog stick menu navigation (#16743)
Two new settings added to Settings / Input / Menu Control:
- disable left analog stick in menu navigation
- disable right analog stick in menu navigation

Since the corresponding logic is already a distinct logic flow in
input driver, no change was necessary to analog-to-digital settings
or the like.
2024-09-10 18:13:31 -07:00
libretroadmin
e675ea7e29 Variable cleanups - add TODO/FIXME notes for spurious variable sizes 2024-09-09 15:22:08 +02:00
Eric Warmenhoven
fdf2faaf59
macOS: Don't include video/input drivers when compiling with SDL2 (#16865) 2024-08-10 17:56:03 -07:00
zoltanvb
e5e7e66199
Add sensor function placeholders for all joypad drivers. (#16812)
In some cases, set_sensor_state and get_sensor_input are
more related to the joypad driver, e.g. in desktop platforms
where sensors are associated rather with the joypad.

If input driver supports the sensors, it is still preferred.
Placeholder inserted for all input drivers, no functionality
added yet.
2024-07-24 15:13:16 -07:00
libretroadmin
3c45d78a95 Buildfix 2024-07-20 19:49:31 +02:00
libretroadmin
afc9cb509a CXX_BUILDFIX buildfixes 2024-07-20 19:42:45 +02:00
libretroadmin
e543aa25ae Silence some warnings 2024-07-20 15:46:26 +02:00
zoltanvb
7db9a2de60 Test input driver and sensor test screen
A new input driver (test_input), similar to test joypad driver.
Takes its inputs from a json file provided in options. Supports
keyboard input and sensor input (accelerometer, gyroscope,
illuminance).

Remote Retropad extended with a sensor test screen.
2024-07-06 13:55:55 -05:00
Joseph C. Osborn
6104a9ad86 change some replay file seeks to seek+truncates in record mode 2024-06-18 13:13:59 -05:00
libretroadmin
54a24dc9d5 input_config_get_bind_string - do proper character
counting now, avoid strlcats, and have functions return
size_t value indicating how many chars were written
2024-06-16 18:07:30 +02:00
libretroadmin
3e2e53ba7f snprintf - if no formatting is required then use strlcpy 2024-06-13 06:48:50 +02:00
zoltanvb
28189a04a4
Analog button and keyboard tester. (#16390)
Added analog button indication for those buttons that may have use for it
- primarily L2/R2, but support was added for all buttons where at least
one controller is known to support it. Added also core option to hide
mismatching inputs where analog value is not sent (like keyboard
hotkeys assigned to retropad buttons). Analog button inputs are not
set up for remote transmission, only for local test.

Analog axes have now also dynamic coloring.

Added a keyboard tester screen which includes a standard 102-key PC
keyboard + extra blocks for all RETROK_ values present in the code.
Screen adapted from DOSBox-Pure onscreen keyboard with permission.
Keyboard button A+B switches between the two screens. Keyboard
inputs are not set up for remote transmission, only for local test.
Core option added to select start screen.

Other small improvements: core reset will take new option values,
input driver applies received values more carefully.
2024-05-04 00:33:25 -07:00
Barry Rowe
26a824caff
Revert of AI service changes (#16428) 2024-04-12 16:17:24 -07:00
zoltanvb
b27233b3b8
Test input joypad driver (#16370)
* Test driver for joypad inputs

Add a new joypad input driver:
- hide driver behind #ifdef and enable it in config_params.sh
- add a new config parameter to specify the test input file
- add aux files: additional config files that cancel out any binds
  that may be present in RA config, autoconfig profile for
  test joypads, test input file that matches controller test
  sequence

* Fixes and comments for test input driver.
2024-03-18 12:07:36 -07:00
neil4
5306da72ce
Minor updates to Overlay Mouse and Lightgun (#16366) 2024-03-17 09:40:50 -07:00
neil4
cc97df732c
Add Overlay Mouse, Lightgun, and Pointer (#16343)
- When enabled, any touch inputs not in a hitbox are used to create pointing device input for the core.
- Mouse: 1-, 2-, 3-touch inputs are LMB, RMB, and MMB
- Lightgun: allows input from overlay buttons or multi-touch mappings
2024-03-16 01:56:30 -07:00
Bobby Smith
e1cc4fb14d
Add a new "Classic (Toggle)" turbo mode (#16239) 2024-02-18 08:24:05 -08:00
sonninnos
6e6a4d8b6d
RETROK_UNKNOWN fixes and cleanups (#16250) 2024-02-18 08:23:05 -08:00
sonninnos
e8956418a8
Fix input state combos and empty binds (#16233) 2024-02-13 16:16:39 -08:00
Viačasłaŭ Chalikin
997c7453a8
Fix narrator modes (#16179)
* Fix narrator

* Refactor accessibility
2024-02-08 21:14:23 -08:00
Bobby Smith
7c3d07bf6d
Tweaks to how the "Analog to Digital Type" setting is saved (#16187) 2024-02-02 12:53:24 -08:00
sonninnos
8ad8b6bdad
Input state overflow band-aid (#16168) 2024-01-26 09:44:48 -08:00
sonninnos
8f77938767
Fix ghost input when setting RETROK_UNKNOWN (#16163) 2024-01-25 02:46:48 -08:00
sonninnos
266d3ed150
Add option for merging 'Hotkey Enable' device types (#16152) 2024-01-21 18:13:17 -08:00
Eric Warmenhoven
e6eadecabd
Disable mFI secondary_joypad behavior (#16129)
Some controllers show up as both HID and mFI. In that case we probably
want to let the user pick which driver to use, rather than balance
across them.

This fixes issues with the analog stick moving in the wrong direction
on the y axis.
2024-01-18 09:33:16 -08:00
hunterk
6513a023b8
Add a setting to allow turbo d-pad directions (#16006)
* Add option to allow turbo d-pad inputs

* fix macro tab and update comment
2023-12-13 18:36:09 -08:00
Joe Osborn
2baf9ec7e0
Enqueue replay record/playback until next frame (#15751)
* Enqueue replay record/playback until next frame

This fixes a bug where stdin commands activated via polling would
trigger replay record/playback in the middle of a frame, then input
checking would pull from them before the next frame came around---it
only makes sense to change the active replay in between frames, not
during them.

* fix comment syntax
2023-10-04 00:53:51 -07:00
sonninnos
ea86be0a2b
Fix menu analog stick navigation (#15740) 2023-09-26 05:30:15 -07:00
sonninnos
cf2ee94c9f
Correction for not showing mouse cursor with overlay (#15687) 2023-09-11 17:28:33 -07:00
sonninnos
ea1bdade61
Allow more keyboard actions with menu osk (#15662) 2023-09-01 15:48:55 -07:00
libretroadmin
c82401dcb4 input_device_info - slim down - we don't need config_path and some of
the char arrays can be much smaller
2023-08-30 08:34:21 +02:00
sonninnos
c708187cd2
Search box usability improvements (#15617) 2023-08-18 12:38:29 -07:00
libretroadmin
e5ef309b58 get_bind_string_joyaxis - small simplification 2023-08-16 20:29:40 +02:00
libretroadmin
d6ae25d980 Don't add to len variable if not used 2023-08-16 20:26:15 +02:00
sonninnos
de45fc2f5f
Input binding rework (#15603)
* Input binding rework

* Controller info logging cleanup
2023-08-16 11:13:14 -07:00
libretroadmin
f51b49f213 More explicit typecasts to bools 2023-08-16 03:22:02 +02:00
libretroadmin
bd7a0f7f0a Explicit typecast to bool for some flag to bool conversions 2023-08-16 00:16:03 +02:00
libretroadmin
c8e6506687 Fix --disable-menu errors 2023-08-14 23:36:19 +02:00
neil4
fbd8498686
Overlays: Apply range_mod only for the touch inputs that trigger it (#15534) 2023-07-30 09:49:59 +02:00