* 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/23518https://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
* Add dummy game ai subsystem
* First working prototype of a machine learning model that can override player input
* Update README.md
* Update README.md
* Fix loading path on Windows
* Change ai override to player 2
* Added quick menu show game ai option
* Implemented Quick Menu entry for Game AI options
* Redirect debug logs to retroarch log system + properly support player override
* Added support to use framebuffer as input to the AI
* Added pixel format parameter to API
* Fix game name
* code clean-up of game_ai.cpp
* Update README.md - Windows Build
* Update README.md
* Update README.md
* Update README.md
* Update config.params.sh
turn off GAME_AI feature by default
* Fix compile error in menu_displaylist.c
* Add missing #define in menu_cbs_title.c
* Added new game_ai entry in griffin_cpp
* Remove GAME_AI entry in msg_hash_us.c
* Fix compile error in menu_displaylist.h
* Removed GAME AI references from README.md
* Fixes coding style + add GameAI lib API header
* Convert comment to legacy + remove unused code
* Additional coding style fixes to game_ai.cpp
* Fix identation issues in game_ai.cpp
* Removed some debug code in game_ai.cpp
* Add game_ai_lib in deps
* Replace assert with retro_assert
* Update Makefile.common
* Converting game_ai from cpp to c. First step.
* Convert game_ai from CPP to C. STEP 2: add C function calls
* Convert game_ai from CPP to C. Final Step
* Added shutdown function for game ai lib
* Update game_ai_lib README
* Fix crash when loading/unloading multiple games
- Fix the "Allow Off-Screen" setting not working since #17308
- Prevent offscreen shot from disabling the lightgun with some cores
- Fullscreen pointer coordinates no longer needed
Cocoa driver specific changes:
- make sure pointer position is always within [-0x7fff,0x7fff] by using the confined wrapper
- enable pointer offscreen query
Adapt the sanitized pointer handling, discussed at #17196 :
Overlay "driver" specific changes:
- make sure pointer position is always within [-0x7fff,0x7fff] by using the confined wrapper
- enable pointer offscreen query
- report -0x8000 for lightgun if pointer is at the edge
- align lightgun offscreen reporting and button ID conversion with other drivers
Android driver specific changes:
- make sure pointer position is always within [-0x7fff,0x7fff] by using the confined wrapper
- remove extra "inside" checks, general simplification
- enable pointer offscreen reporting
- report same value for all ports when querying mouse and lightgun
- fill missing lightgun support, with fixed button map
Udev and X11 driver specific changes:
- simulate max. 3 touches instead of 1 using different mouse buttons
Wayland driver specific changes:
- integrate touch input better to the overall handling (enabling overlay usage with mouse)
- simulate max. 3 touches instead of 1 using different mouse buttons
* Less string copies
* Some general cleanups
* Add extra param to runloop_message_queue_push so we can pass size_t
of the message
* Consistent conventions for local variable usage for certain things
Adapt the sanitized pointer handling, discussed at libretro#17196 :
winraw and dinput driver specific changes:
make sure pointer position is always within [-0x7fff,0x7fff] by using the confined wrapper
remove extra "inside" checks, general simplification
enable pointer offscreen reporting
use common functions for edge detection and lightgun button ID conversion
sdl driver specific changes:
pointer handling aligned with the other input drivers, as above
added TODO for lightgun part - no suitable test env at the moment where SDL input can be used
Adapt the sanitized pointer handling, discussed at #17196 :
X11 driver specific changes:
make sure pointer position is always within [-0x7fff,0x7fff] by using the confined wrapper
remove extra "inside" checks, general simplification
enable pointer offscreen reporting
Udev driver specific changes:
remove custom calculation and use common viewport translation
unify pointer query instead of separate _x and _y
enable pointer offscreen reporting
Other changes:
more tuning of pointer conversion in video_driver.c for edges
lightgun button ID conversion moved to input_driver.c
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.