* Rename the `MIN_MATCH` defined by xdelta3 to `XD3_MIN_MATCH`
- zlib defines its own macro by that name, but with a different value
* Don't redefine `SIZEOF_ARRAY` in xdelta3 if it already exists
* Don't define ssize_t in xdelta3, rely on libretro's definition instead
* Enable xdelta3 support in MSVC 2015-2019
* Fix some invalid MSBuild condition syntax
* Always build xdelta with XD3_USE_LARGESIZET as 1
* Fix an `#if` in task_patch.c
* Enable `HAVE_XDELTA` in the UWP build
* First crack at fixing Xdelta support for Android
* Add xdelta in deps
* Include <assert.h> in xdelta3.h
- Otherwise the static_assert calls can fail
* Build xdelta3 in Makefile.common
* Add xdelta support to the softpatching infrastructure
- The patching itself isn't fully implemented yet
* Adjust how xdelta3.h checks the sizes of some types
- Now checks max values instead of relying on autotools
* Add some enums that were excluded by the cherry-pick
* Remove stray whitespace
* Adjust SIZE macros in xdelta3.h
- Move them outside the XD3_USE_LARGEFILE64 block
- Add more SIZE declarations
- Make SIZEOF_UNSIGNED_LONG_LONG contingent on the presence of ULLONG_MAX
* Reintegrate xdelta support
* Enable support for xdelta's secondary compressors
- Necessary for some patches
* Fix some format specifiers
* Remove unnecessary files from xdelta
* Include xdelta3.h with a relative path
* Add xdelta3 headers to HEADERS variable
* Gate Xdelta support behind HAVE_XDELTA
- HAVE_XDELTA is on by default
- HAVE_PATCH is still required for HAVE_XDELTA to be meaningful
- Support is mostly contingent on the availability of LZMA
- Anything modern should be okay
- Legacy platforms (e.g. DOS) may need to have Xdelta support disabled
- At least until some other solution can be found
* Disable HAVE_XDELTA on platforms where the build recently failed
- These come from looking at the failed builds on GitHub
- These are guesses, and may turn out to be wrong
* Fix a potential memory leak
- Whoops, looks like I need to call two cleanup functions
- xd3_close_stream exists separately from xd3_free_stream
* Split the --help printout for --xdelta into its own strlcat call
- GCC was complaining about #ifdefs within macro arguments being non-portable
* Fix some incorrect printf format specifiers
* Modify Xdelta to adhere to C89
- It's mostly using RetroArch's INLINE macro instead of the inline keyword
* Slight cleanups
* Remove a stray comma that was hindering C89 builds
* Add XDelta support to CHANGES.md
* Change how the xdelta patch's name is computed
- To be in line with other recent refactoring
* Fix an incorrect merge
- Whoops, this part was from before I figured out how to get the size of a patched file
* Explain the song-and-dance behind computing a patched file's size
* Define some XDelta3-related constants to 0 on 32-bit platforms
* Adjust some Xdelta-related macro definitions
- Exclude the encoder, since we're not making patches
- Move some #defines to after inclusion of <stdint.h>, to fix undefined behavior
- Remove _WIN32_WINNT overrides, since they were for code that we're not using
* Fix Xdelta support
* Wrap an encoder-only function in `#if XD3_ENCODER`
* AI service rework
* File missing
* Fixed C89 build
* Fixed usage of inline for C89 build
* Fixed an overlay unloading bug
Made sure to unload the overlay on release and when the server returns empty values in automatic modes.
* Fixed forward decl (c89)
* Fixed OpenGL texture loading
Moved image display to the main thread for now
* Changed some formatting slightly
* Fixed struct variable order and put brackets on newlines
* Moved pointer, fixed retroarch.cfg, and replaced strlcat with strlcpy
* Fixed catenation issue
* Fixed a few other catenation issues
* Fixed one more concatenation issue
* Fixed concatenation issue
* Fixed a few other concatenation issues
* Fixed one more concatenation issue
* potential fix for parsing issue
---------
Co-authored-by: Xunkar <329857+xunkar@users.noreply.github.com>
* 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
Add keyboard overlay preset, keyboard submenu, and osk_toggle hotkey. Use overlay caching for osk_toggle.
For now, keyboard menu has only preset path, auto-scale toggle, and opacity.
Related fixes:
- input_keyboard_event: Don't check hotkey binds when device is RETRO_DEVICE_POINTER
- Add input_keymaps_translate_rk_to_ascii() for correct character input to input_keyboard_event
- input_overlay_poll: Delay clearing INPUT_OVERLAY_BLOCKED flag until there is no overlay input (Avoids stray input after osk_toggle)
- Send keyboard events for modifiers before other keys (for correct modifier+key input if hitboxes overlap)
Adds overlay_cache_ptr to keep a disabled overlay in memory when it's expected to be shown again.
Most input_overlay_deinit calls are replaced with input_overlay_unload, which caches the overlay unless initing/deiniting core or disabling overlays.
Loading a cached overlay is done as a swap, intended for osk_toggle.
Related updates:
- Fewer parameters for the overlay loading task. Use current settings when enabling an overlay
- Add input_overlay_check_mouse_cursor() to preserve show/hide mouse behavior
- Don't apply input_overlay_show_mouse_cursor in windowed mode (controlled by mouse grab only)
- Remove some dead code
Adds a new libretro interface for a core to send and receive custom network packets for implementing a communication based multiplayer system instead of using the default state serialization based multiplayer. Connection management is still done by the frontend while a core gains the ability to easily support tunneling of multi-console data communication traffic.
assignments for strings longer than 2 chars
- Use strlcpy concatenation instead of strlcat
- Make sure that what remains of iteration of the '_len' variable
for manual char assignment
is done in a safer way so mistakes are less possible
usage of strlcpy (when position/offset of previous strlcpy/snprintf call
is known. strlcat implementation in libretro-common makes implicit strlen
call, using strlcpy avoids this
* Reduce a bunch of local char variables by use of said clever usage,
should save up on local stack size usage
* Rewind during recording isn't visibly busted anymore but it doesn't rewind the replay properly during playback or record, inputs get clobbered; check frame pos/ptr stuff.
* Fix rewinding during movie recording and playback?
* change bsv file suffix to replay, update strings
* add trivial RPLY block to save states
* WIP rerecording support, doesn't load states properly yet--issue with checking identifiers?
* Fixed a type error to get time identifiers working right, ready for testing
* handle case where state without replay data is loaded during replay
* cleanups
* whitespace cleanup
* Cleanups, change replay file format magic, fix logic around future states
* Remove failed future message
* Add play-replay-from-slot command, fix load-state-from-slot to use given slot
* build fixes
* Fix race conditions in emscripten build and incorrect replay state incrementing
* Style fix for single line if
---------
Co-authored-by: Joseph C. Osborn <jcoa2018@pomona.edu>
* Add bsv replay controls (not yet fully implemented), remove toggle
see notes in task_movie.c, make sure command.c calls the right
functions, check retroarch.c and other todos.
bsv files are also now stored with states, not saves.
* Compilation fixes
* Added command impls for play and record replay, and some code in load state to do the right thing there
* Guard some parts of the new code with HAVE_BSV_MOVIE
* wip, menu fixes
* more menu fixes, osd for movie errors, halt recording properly
* Menu and label fixes
* move bsvs to own file suffix series under savestates, fix recording and playback command validity checks
* Fix replay autoincrement
* fix endif placement, whoops
---------
Co-authored-by: Joseph C. Osborn <jcoa2018@pomona.edu>
Prevent double free and null dereference when the controller is quickly reconnected.
Handle error when controller device query returns null instead of crashing.
This relaxes a warning about save state sizes for cores like
dosbox-pure that don't report accurate save state sizes.
Before, the warning would be issued and the state would not be loaded;
now, the warning is issued and the state is loaded anyway.
Co-authored-by: Joseph C. Osborn <jcoa2018@pomona.edu>
* BSV ergonomics improvements
- Date stamp toggled recordings instead of overwriting or using save
slot number
- Properly stop movie on playback EOF; also pause emulation
- Add recording flag to match playback flag in bsv state enum
- Rename bsv "movie path" to "movie auto path" to clarify role
- Allow stopping movie playback before EOF using record toggle hotkey
---------
Co-authored-by: Joseph C. Osborn <jcoa2018@pomona.edu>
* Allow for both -e and -R to start a BSV file recording at a state
The key issue is that loading a state takes some time, and the BSV
recording shouldn't start until that's done.
The minimal patch for this would just be a change to runloop.c which
moves movie initialization after entry state loading, throwing in a
task_queue_wait(). This makes for some awkward repeated autoload OSD
messages and doesn't solve the underlying issue.
Most of this change puts BSV recording start/stop into tasks, like
saving and loading are tasks; this was important to centralize BSV
operations a bit more and is the first part of a refactoring towards
more robust input recording. The necessary wait is introduced in the
begin-recording callback.
Co-authored-by: Joseph C. Osborn <jcoa2018@pomona.edu>