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
Add another version of the coordinate translation that will not
report -0x8000 for offscreen values, but instead map the position
to the respective edge (0x7fff/-0x7fff). Not yet in use.
Udev driver updated to use the wrapper, as all other input drivers do.
* First crack at light sensor support for Linux
* Add light-sensor support to most Linux input drivers
* Fix a compiler error
- Whoops, forgot to declare `sdl`
* Refactor linux_illuminance_sensor_t
- Allow the poll rate to be specified
- Poll the sensor on a separate thread
- Open a file handle each time we poll the sensor, since sysfs doesn't update the contents of an existing handle
* Set the `done` flag when closing the light sensor
- Whoops
* Avoid a division by zero when updating the poll rate of an existing sensor
* Don't try to open illuminance sensors from ".", "..", or hidden files
* Never mind
* Fix some silly mistakes
* Skip hidden files, ".", and ".."
* Cancel the sensor poll thread mid-sleep when closing it
- POSIX says it's fine
* Add to CHANGES.md
* Address feedback given on PR
* Use libretro-common's file system instead of stdio
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.
Because shift keys were ignored in the event message and only issued during polling, a quick key press and release between polling would get ignored.
This change also fixes left alt up key events getting issued (and sent to the core) twice.
- 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
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.
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.
This commit imports a series of patches from the FreeBSD port of RetroArch to
improve build compatibility and address specific issues encountered in the
FreeBSD environment. These patches, sourced from the FreeBSD Ports collection
(https://cgit.freebsd.org/ports/tree/games/retroarch/files), have been adapted
and tested to ensure they integrate seamlessly with the current build process.
* 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
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.
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.
Support added for extra mouse buttons. Since these buttons were
not returned by XQueryPointer(), some additional logic was needed
which fit best to scroll wheel handling.
- Add missing numlock mod to dinput
- Add missing scrolllock mod to x11
- Add missing capslock, numlock, scrolllock and meta mods to android
- Add missing scrolllock mod to sdl
- Add missing capslock, numlock, scrolllock and meta mods to switch
- Add missing numlock mod to winraw
- Add missing numlock mod to uwp