Commit Graph

4555 Commits

Author SHA1 Message Date
libretroadmin 15819612f7 Fix semicolon near end of conditional 2025-05-29 09:22:42 +02:00
libretroadmin 18ca0e671d (XInput) More C89 fixes and style nits 2025-05-29 09:17:52 +02:00
libretroadmin bd04f9154b C89 buildfix 2025-05-29 06:11:08 +02:00
libretroadmin c372dfad8b Rework xinput_joypad_rumble somewhat 2025-05-29 05:59:46 +02:00
libretroadmin b1ad554a14 C89_BUILD fixes 2025-05-29 04:59:41 +02:00
Ryunam 7ad10258f0 XInput: Reduce unnecessary polling and optimize performance 2025-05-29 00:21:43 +02:00
Ryunam bd9561d93c XInput: Fix rumble overload by limiting on state changes and interval 2025-05-28 17:20:33 +02:00
sonninnos a1a50afc9e Dinput: Ignore first mouse click on focus 2025-05-27 23:47:06 +03:00
sonninnos b3fd3e15ed WinRaw: Prevent stuck mouse buttons on unfocus 2025-05-27 22:43:15 +03:00
sonninnos 3f2021249b Deprecated msg hash cleanups 2025-05-25 15:49:49 +03:00
sonninnos cc57bbc06e
Turbo mode corrections (#17905) 2025-05-14 22:37:05 +03:00
sonninnos ee11b79738
Improve playlist thumbnail cycling (#17897)
* Improve playlist thumbnail cycling

* GLUI: Thumbnail cycling fixes
2025-05-13 22:14:49 +03:00
LibretroAdmin 79d78a6860
Merge pull request #17880 from Sunderland93/wayland_toplevel_icon
[Wayland]: Add support for xdg-toplevel-icon-v1
2025-05-09 06:14:58 +02:00
Aleksey Samoilov 7264709776 Set toplevel icon for libdecor frame 2025-05-09 02:15:22 +04:00
BinBashBanana 2d3c18e48d Emscripten improvements pt. 4 2025-05-08 11:01:43 -07:00
Aleksey Samoilov 6c7b648570 [Wayland]: Add support for xdg-toplevel-icon-v1 2025-05-08 17:58:20 +04:00
sonninnos 10738f532c
Add shader hold hotkey and improve toggling logic (#17840) 2025-05-08 00:56:59 +03:00
zoltanvb 1678e25af0 Extend X11 input driver with XInput2 extensions for multi-mouse
Add multi-mouse support for X11, by using XInput2 extensions. Only
master pointers are considered as mice.

New behavior put behind HAVE_XI2 and configure script extended with
necessary detection.
2025-04-13 12:16:53 +02:00
pstef d6cc1847bf Finish converting to SOCKET type in _WIN32 code
fixes c048a21
2025-04-12 10:45:08 +00:00
pstef 66aa1424f0 Define WIN32_LEAN_AND_MEAN to avoid collision with winsock2 2025-04-12 10:45:08 +00:00
pstef c048a21aa4 Use platform-specific checks for invalid descriptors
Check network fd/socket validity using INVALID_SOCKET on Windows
(requiring conditional winsock2.h include) and < 0 otherwise.
Fixes -Wsign-compare warning.
2025-04-10 21:10:45 +00:00
pstef bcc3ae448f Silence a -Waddress warning 2025-04-10 21:10:45 +00:00
LibretroAdmin 82d8b9630a
Merge pull request #17750 from BinBashBanana/master 2025-04-10 03:35:45 -07:00
pstef d65c17f6b8 Add missing includes
malloc.h for memalign() and unistd.h for usleep().
2025-04-09 20:43:09 +00:00
LibretroAdmin 4bf8855fda
Merge pull request #17754 from zoltanvb/udev_to_linuxraw_fallback
Save fallback to linuxraw driver in case of first boot.
2025-04-09 13:26:34 -07:00
LibretroAdmin c9998dfb32
Merge pull request #17752 from neil4/fix-overlay-mouse-lightgun 2025-04-06 01:53:55 -07:00
pstef b3f1152049 Fix a callback function's type to enable compilation with GCC14 2025-04-06 00:57:34 +00:00
zoltanvb 3bbbeca957 Save fallback to linuxraw driver in case of first boot.
When no devices can be detected and it is the initial boot, make
sure the driver is set to linuxraw, if supported.
2025-04-01 21:55:14 +02:00
nfore b9beaa8564 Fix overlay lightgun, mouse & pointer
- Ensure other touchscreen input is blocked when overlay buttons pressed
- Limit physical+overlay mouse input to iOS for now
- Reset overlay mouse deltas when there is no touch input
- Disable touch mouse in android_input.c for now. Too buggy
2025-03-29 08:56:35 -05:00
LibretroAdmin 76598f1016
Merge pull request #17745 from pstef/silence-warnings
Silence warnings
2025-03-29 03:12:00 -07:00
BinBashBanana 05cefc9a4d AudioWorklet driver, misc. emscripten fixes 2025-03-28 19:41:40 -07:00
pstef a25a4d29a8 Silence a -Waddress warning 2025-03-28 09:48:21 +00:00
pstef 626ef6ce4b Remove unused variable
It would be used only once in this context, so just remove it.
2025-03-27 18:33:55 +00:00
zoltanvb 5b2904930b Extend keyboard input for linuxraw input driver
The keyboard support for linuxraw driver was a bit spotty. Extended
with missing keyboard query, callback, and a few fixes against
over-indexing the status array.
2025-03-27 15:04:19 +01:00
pstef ac38cfe8da Silence -Waddress
This is a continuation of c9149895f5
2025-03-25 20:06:33 +00:00
LibretroAdmin 7e1c036fc0
Merge pull request #17693 from JesseTG/jtg/fix-light-sensor-parsing 2025-03-12 16:43:54 -07:00
Jesse Talavera a52a63c381 Fix the light sensor reading on Linux input drivers
A previous `errno` was causing `linux_read_illuminance_sensor` to fail despite parsing the returned value correctly
2025-03-12 18:25:21 -04:00
LibretroAdmin 4b368ae008
Merge pull request #17664 from BinBashBanana/master 2025-03-08 20:24:15 -08:00
zoltanvb 176247d3bc Remove special handling of pause key 2025-03-06 17:55:37 +01:00
BinBashBanana f6eb1ed5c5 Threaded emscripten improvements 2025-03-05 10:39:43 -08:00
zoltanvb 27b67c1340 Fix keyboard_mapping_blocked usage (game focus) 2025-03-05 06:23:53 +01:00
sonninnos b62cc87e84
Turbo Fire overhaul (#17633) 2025-02-27 20:15:22 -08:00
Joe Osborn c413bcc626
Threaded emscripten fixes (#17614)
* Actually read CLI args in emscripten

* Fix fetchfs manifest parsing, increase download chunk size

The chunk size should probably be made a parameter in the future.  The
larger chunk size trades longer hitches for fewer hitches.

* Add exec command driver and API functions for emscripten.

Under WASMFS, stdin/stdout can't be customized the way they can with
the JS FS implementation.  Also, this approach frees up stdin/stdout
and simplifies interaction with the command interface for web embedders.

* fixup upload paths, show use of new emscripten cmd interface

* Add JS library function names to EXPORTS as well as EXPORTED_FUNCTIONS for older emsdk versions
2025-02-24 09:25:05 -08:00
Eric Warmenhoven 84eb4f32e0
Small adjustment to coordinating mouse inputs (#17622) 2025-02-23 04:25:29 -08:00
Eric Warmenhoven e26b3bca4e
allow mouse input while mouse overlay is active (#17615) 2025-02-21 12:33:27 -08:00
Joe Osborn 56014a27d6
Enable pthreads on Emscripten (#17586)
* workerized RA

* Workerized (non-async) web player, using OPFS

This patch eliminates the need for asyncify and uses modern filesystem
APIs instead of the deprecated, unmaintained BrowserFS.

This is a WIP patch because it won't fully work until these two
Emscripten PRs land and are released:

https://github.com/emscripten-core/emscripten/pull/23518
https://github.com/emscripten-core/emscripten/pull/23021

The former fixes an offscreen canvas context recreation bug, and the
latter adds an equivalent to BrowserFS's XHR filesystem (but without
the hazardous running-XHR-on-the-main-thread problem).

The biggest issue is that local storage of users who were using the
old version of the webplayer will be gone when they switch to the new
webplayer.  I don't have a good story for converting the old BrowserFS
IDBFS contents into the new OPFS filesystem (the move is worth doing
because OPFS supports seeking and reading only bits of a file, and
because BrowserFS is dead).

I've kept around the old libretro webplayer under
pkg/emscripten/libretro-classic, and with these make flags you can
build a non-workerized RA that uses asyncify to sleep as before:

make -f Makefile.emscripten libretro=$CORE HAVE_WORKER=0 HAVE_WASMFS=0 PTHREAD=0 HAVE_AL=1

I also moved the default directory for core content on emscripten to
not be a subdirectory of the local filesystem mount, because it's
confusing to have a subdirectory that's lazily fetched and not
mirrored to the local storage.  I think it won't impact existing users
of the classic web player because they already have a retroarch.cfg in
place.

* Get fetchfs working without manifest support

* makefile fixes

* fix scaling, remove zip dependency

* Support asset/cheats/etc downloaders for emscripten

- Add http transfer support for emscripten
  - At the task_http level, not the net_http level --- so no netplay
    or webdav.
- Change default paths to be more like other platforms
- Gives us smaller bundles and a faster boot time
- Had to work around a task queue bug on Emscripten
  - I made the smallest possible change to do it, but it may be better
    to fix in rthread.c

* Load an emscripten file_packager package on first run

If no ozone assets are present, load a libretro_minimal package
created using Emscripten's built-in file packager.

* updated readme, removed indexer from wasmfs libretro-web

* Put back zip dependency, load asset bundle into opfs on first run

* fix upload path

* Remove unused function

* easy testing setup for two multithreaded conditions

1. make PROXY_TO_PTHREAD=1 (slower)
2. make PROXY_TO_PTHREAD=0 (bad audio, because doesn't sleep in
openal.c)

* Remove condition on sleep in openal

also make input_driver check existence of drv->axis, drv->button
before calling them.

* Fix resizing under EGL

* Don't force config file path on emscripten

* Add time.h include to netplay, default HAVE_NETPLAYDISCOVERY to 0

* Remove nearly all proxied joypad calls under emscripten

* Fix file uploads under firefox

* Fix safari API uses, but Safari still hangs in OPFS filesystem mount

I think this can be fixed by moving the backend creation off the main
thread.

* Move filesystem init into emscripten C entry point

* Setup filesystems off of main thread

* re-set default player to async

Also improve Safari compatibility under proxy-to-pthread condition

* Safari upload file fixes

* Remove some excess prints

* Fix typo
2025-02-20 00:59:25 +01:00
Eric Warmenhoven 6ec4ffb2fa
apple, mouse overlay: fix relative mouse deltas (#17602)
makes sure that relative mouse movement deltas are based on last poll,
not last state check; checking state should not reset state
2025-02-20 00:59:14 +01:00
LibretroAdmin f6006ae6ca Style nits 2025-02-12 10:17:35 +01:00
LibretroAdmin 7a7c4df2a1 Settings cleanups 2025-02-10 17:12:02 +01:00
LibretroAdmin c57c4fbd1a Style nits 2025-02-10 13:59:25 +01:00