50 Commits

Author SHA1 Message Date
zoltanvb
072d949346
Pointer handling sanitization - wayland and libretro.h changes (#17277)
Adapt the sanitized pointer handling, discussed at #17196:

Wayland driver specific changes:
- make sure pointer position is always within [-0x7fff,0x7fff]
  by using the confined wrapper
- enable lightgun to report -0x8000 if pointer is really offscreen
- remove extra "inside" checks
- report same pointer/lightgun coordinates for all ports
- simplify pointer and lightgun handling

Other changes:
- unify "offscreen" condition through input_driver.c
- slight tuning of pointer conversion in video_driver.c
- update libretro.h with explanation and pointer offscreen value
- small fixes on remote retropad test screen
2024-12-21 13:28:27 -08:00
libretroadmin
82e4504968 Revert "(pt. 2) static variables are initialized to '0' automatically as per C rules"
This reverts commit 47410df7a3d2480dd8fc7fb97cf00319ce5e9344.
2024-11-19 03:03:05 +01:00
libretroadmin
47410df7a3 (pt. 2) static variables are initialized to '0' automatically as per C rules 2024-11-18 15:59:46 +01:00
zoltanvb
2a6de277b1
Extend the sensor/pointer test screen (#17180)
Added extra edge indicators for special -0x8000 coordinates,
added touch press display, and fixed horizontal wheel display.
2024-11-10 15:02:00 -08:00
LibretroAdmin
e45bc853ec
Revert "Pointer confinement support (opt-in) (#17169)" (#17173)
This reverts commit 90ee413a81c30e26a8e9b141a6716dc979607b87.
2024-11-07 07:31:47 -08:00
zoltanvb
90ee413a81
Pointer confinement support (opt-in) (#17169)
New environment set call to enable a bit more sensible handling of
absolute pointing devices (pointer and lightgun). With the
confinement enabled, pointing devices will not return neither
-0x8000 nor (0,0), which was anyway dependent on the input driver,
instead they will stay at the extreme edge.
2024-11-06 15:19:08 -08:00
zoltanvb
ede9ddcd05
Tests for pointer device and associated buttons. (#17130)
Sensor screen is extended with a pointer (a single white pixel)
and a few indicators for the mouse and lightgun buttons. Pointer
type is selectable from core options (mouse, lightgun, pointer,
old relative lightgun). An extra square indicator shows when
absolute pointer types get near the edge / to the very edge /
return to 0,0 position.
2024-10-28 14:33:17 -07:00
Eric Warmenhoven
b557bc9523
Fixing compiler warnings (#17001) 2024-09-14 13:11:20 -07:00
libretroadmin
b8391e233f * PATH_MAX_LENGTH redefined from 4096 to 2048
* Massive reduction in heap space allocation, going from settings struct
264kb to 119Kb
* Use NAME_MAX_LENGTH for base paths/names, etc
* Use DIR_MAX_LENGTH for directory sizes
2024-09-09 05:47:32 +02:00
libretroadmin
77a52bcec5 Silence warnings 2024-07-20 16:08:13 +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
libretroadmin
6cc5c414da Revert "Cleanups - remove/silence warnings"
This reverts commit cf04a2c0fe41b4c8428f0103a4f6e6b41270be1b.
2024-06-15 06:20:55 +02:00
libretroadmin
cf04a2c0fe Cleanups - remove/silence warnings 2024-05-23 07:48:08 +02:00
zoltanvb
198656eb20
Add support for multimedia keys (#16502)
Extended RETROK_ values with 18 new items, commonly found on
"multimedia" keyboards.

Mapping added for SDL, X11, Wayland, dinput, winraw keymaps.

Keyboard tester function of Remote Retropad extended to cover new keys.

One fix in Android mapping for #12986
2024-05-11 17:06:54 -07:00
zoltanvb
3092740312
Fix socket close method (#16494)
Use the platform independent socket close function from same place where all other socket communication is used from.
2024-05-05 03:48:37 -07: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
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
zoltanvb
99aadc8651
Input test function for Remote RetroPad (#16357)
Add input test capability for Remote Retropad core:
- read an .ratst file (JSON format) with test steps
- display instruction (via libretro SET_MESSAGE)
- highlight input to be activated
- display summary when test is finished
2024-03-15 23:59:56 -07:00
zoltanvb
c5c17dac46
Remote retropad display update (#16342)
Refine the display for Remote RetroPad, as a preparation for
using it as a test tool:
- added display for analog axes
- all inputs that were hit at least once, receive a light green color
- removed useless extra button (could never be sent)
2024-03-09 22:48:57 -08:00
orbea
28ff4b391a Clean up white space. 2019-02-03 16:00:50 -08:00
orbea
e062b98088 Remove trailing blank lines.
find . -type f -exec sed -i '${/^[[:space:]]*$/d;}' {} \+
2019-01-17 19:39:38 -08:00
orbea
bfc366decc Squeeze extra blank lines with cat(1).
Example:

find . -type f -iname '*.c' | while read -r i; do
  cat -s "$i" > "$i.new"
  mv "$i.new" "$i"
done
2019-01-08 11:04:58 -08:00
twinaphex
b11620e1eb Add retro_timers.h/retro_math.h 2017-06-28 04:41:38 +02:00
Alcaro
fcb17d91d9 warning: comparison between signed and unsigned integer expressions 2017-01-02 02:23:30 +01:00
Twinaphex
3900d433f8 Cleanups 2016-09-29 05:49:10 +02:00
twinaphex
27ee26b331 (net retropad core) cleanup 2016-09-29 04:38:56 +02:00
twinaphex
313c091f31 (net retropad core) Cleanup 2016-09-29 04:36:48 +02:00
twinaphex
091aa7d8a6 (net retropad core) Cleanups 2016-09-29 04:35:39 +02:00
twinaphex
01dc5507fe Fix warning 2016-08-27 02:21:43 +02:00
Alcaro
ba6796b98f Kill some warnings 2016-08-26 18:33:03 +02:00
twinaphex
6f605e2df5 CXX_BUILD buildfix 2016-08-01 22:16:00 +02:00
Sebastien Ronsse
bdbebedd12 net retropad core: Fix R3 button display 2016-07-27 23:53:38 +10:00
twinaphex
389f6579d9 Revert "RetroPad core - R3 key didn't work before"
This reverts commit a483f276e4b5cabfed8f9669cef5ffcf6d716ca7.
2016-07-27 13:23:16 +02:00
twinaphex
a483f276e4 RetroPad core - R3 key didn't work before 2016-07-27 12:25:58 +02:00
Sebastien Ronsse
a778d878ff net retropad core: Add analog device processing 2016-07-27 20:15:49 +10:00
Sebastien Ronsse
a8ff6150f9 net retropad core: Update data processing to be more generic 2016-07-27 17:42:55 +10:00
twinaphex
4587282781 Prevent collissions 2016-07-24 23:58:06 +02:00
twinaphex
5c453c4454 (Net RetroPad) Cleanups 2016-07-24 23:48:39 +02:00
twinaphex
d8d54a15d4 Add L2 / R2 2016-07-24 23:48:06 +02:00
Andre Leiradella
ea6b65a7d6 fixed line ending 2016-07-24 20:45:23 +01:00
Andre Leiradella
31b5e9eb4d added a retropad image showing the button status 2016-07-24 20:39:17 +01:00
radius
a1cf6f29f4 fix map and remove stray printf 2016-06-29 12:23:26 -05:00
radius
24ec6928dc sleep for 4ms 2016-06-29 12:23:25 -05:00
radius
88784aa702 retropad cleanups and avoid sending 0s 2016-06-29 02:06:09 -05:00
twinaphex
8d7540c449 Move some variables around 2016-06-29 07:12:54 +02:00
twinaphex
7e55d0da17 (Net retropad) Prefix core option nams 2016-06-29 06:47:42 +02:00
twinaphex
417f3afdb0 retropad_update_input returns a value instead - get rid
of static global
2016-06-29 06:34:16 +02:00
twinaphex
52b7a95a2b C89_BUILD fixes 2016-06-07 00:03:07 +02:00
twinaphex
1d632e26fe Add missing file 2016-05-26 20:52:27 +02:00
twinaphex
584ec83840 Start adding internal network retropad core hooks 2016-05-26 19:43:15 +02:00