Commit Graph

371 Commits

Author SHA1 Message Date
LibretroAdmin
e45bc853ec
Revert "Pointer confinement support (opt-in) (#17169)" (#17173)
This reverts commit 90ee413a81.
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
libretroadmin
bbfe078515 Reduce char arrays that are 8192 of size or bigger - reduce
Some checks failed
CI 3DS / build (push) Failing after 0s
CI Android / build (push) Failing after 0s
CI DOS/DJGPP / build (push) Failing after 0s
CI Emscripten / build (push) Failing after 0s
CI GameCube / build (push) Failing after 0s
CI Linux (i686) / build (push) Failing after 0s
CI Miyoo ARM32 / build (push) Failing after 0s
CI PS2 / build (push) Failing after 0s
CI PS4/ORBIS / build (push) Failing after 0s
CI PSP / build (push) Failing after 0s
CI PSVita / build (push) Failing after 0s
CI RS90 Odbeta MIPS32 / build (push) Failing after 0s
CI RetroFW MIPS32 / build (push) Failing after 0s
CI Switch/libnx / build (push) Failing after 0s
CI Wii / build (push) Failing after 0s
CI WiiU / build (push) Failing after 0s
CI Windows i686 (MXE) / build (push) Failing after 0s
CI Windows x64 (MXE) / build (push) Failing after 0s
RetroArch CI / linux-c89 (push) Failing after 0s
CI webOS / build (push) Failing after 0s
Crowdin Daily Workflow / sync (push) Failing after 1s
CI Windows (MSVC) / msvc (Debug, x64, 2019) (push) Has been cancelled
CI Windows (MSVC) / msvc (Debug, x64, 2022) (push) Has been cancelled
CI Windows (MSVC) / msvc (Release, x64, 2019) (push) Has been cancelled
CI Windows (MSVC) / msvc (Release, x64, 2022) (push) Has been cancelled
CI Windows (MSVC) / msvc (Release, x64, UWP) (push) Has been cancelled
CI Windows (MSVC) / msvc (ReleaseAngle, x64, UWP) (push) Has been cancelled
CI macOS / build (push) Has been cancelled
them to PATH_MAX_LENGTH * 2 instead
2024-09-15 22:21:22 +02:00
libretroadmin
e675ea7e29 Variable cleanups - add TODO/FIXME notes for spurious variable sizes 2024-09-09 15:22:08 +02: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
sonninnos
391b46c3be
Automatic Frame Delay refactor (#16929) 2024-08-27 01:53:10 -07:00
Ophidon
7b711214a7
Slang Subframe Shaders Feature (#16209)
Adds support for sub-frame shaders to vulkan/glcore/dx10-11-12.

Builds on the concept already present for frame duplication in use for BFI, to present multiple 'sub' frames per real frame to the shaders, so they can run at a higher framerate than the content framerate. Must be enabled via subframe shaders setting under synchronization settings to be active.

Will allow BFI to be implemented inside of the shaders, among any other use for the higher framerate shader authors can devise.

CurrentSubFrame and TotalSubFrames have been available inside the shaders to track what they want to do on an given subframe. TotalSubFrames will always be 1 when the setting is disabled (and when in menu/ff/pause). Framecount will not increment on sub-frames, as it does not for injected bfi frames now. Should not interfere with any existing shaders that do not check for subframes.
2024-02-09 03:12:55 -08:00
Jesse Talavera-Greenberg
cbf49a0b77
XDelta patch support (Take 2) (#15915)
* 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`
2023-11-23 20:19:07 -08:00
sonninnos
9b97b40566
Enforce swap interval 1 in menu if vsync is on + Restore menu_throttle_framerate option (#15889)
* Enforce swap interval 1 in menu if vsync is on

* Restore menu_throttle_framerate option
2023-11-10 18:40:02 -08:00
sonninnos
220caa5143
Remove menu_throttle_framerate option (#15850) 2023-10-31 09:58:47 -07:00
Ophidon
ce6a00b495
High Hz Synchronization (#15798)
* High Hz Synchronization

Makes adjustment to driver_adjust_system_rates and related functions to handle Hz skew adjustment for high refresh rates better, especially when using effective refresh modifiers like swap interval or BFI.

* Reorder for Build Fix

Reorder declaration for build fix
2023-10-14 06:57:40 -07:00
sonninnos
a256a504a8
Fix auto savestate path (#15055) 2023-03-03 23:16:20 +01:00
Joe Osborn
2125770236
Replay UI support (#15048)
* 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>
2023-03-03 00:52:22 +01:00
Joe Osborn
d0ca2384c5
Add LOAD_STATE_SLOT N command to stdin/network protocol (#15010)
* Add LOAD_STATE_SLOT N command to stdin/network protocol

* Style fixes

---------

Co-authored-by: Joseph C. Osborn <jcoa2018@pomona.edu>
2023-02-24 23:04:39 +01:00
sonninnos
f421194974
Pause + hotkey + runloop related changes (#14879) 2023-01-21 01:17:47 +01:00
libretroadmin
f0c8008bda Split up runahead into its own file(s) - runahead.c/runahead.h -
by Dwedit's request
2023-01-11 10:19:56 +01:00
neil4
7213aada8d
Add Preemptive Frames to Latency Settings (#14832) 2023-01-10 07:22:14 +01:00
libretroadmin
8a3686df58 Revert "Header cleanups - don't include retroarch.h everywhere"
This reverts commit 0e3b478f8c.
2023-01-08 09:05:46 +01:00
libretroadmin
0e3b478f8c Header cleanups - don't include retroarch.h everywhere 2023-01-08 08:56:57 +01:00
libretroadmin
5ac8cc0b6a * Rename retroarch_path_set_redirect to runloop_path_set_redirect
* move more retroarch path functions to runloop.c - because they
are related to the runloop state instead of retroarch state
2023-01-06 21:21:31 +01:00
libretroadmin
5debb7a622 Rewrite runloop_set_frame_limit 2023-01-06 20:59:15 +01:00
libretroadmin
5bac2b0204 Cleanups 2023-01-05 23:34:46 +01:00
libretroadmin
27611288c0 Rename retroarch_get_current_savestate_path and retroarch_get_entry_state_path
to runloop_{function_name}
2022-12-29 02:13:31 +01:00
LibretroAdmin
f5133d8cc4
Revert "Add Xdelta support for softpatching (#14706)" (#14743)
This reverts commit aaad220836.
2022-12-19 03:29:46 +01:00
Jesse Talavera-Greenberg
aaad220836
Add Xdelta support for softpatching (#14706)
* 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

* First crack at xdelta softpatching support

- There may be undiscovered edge cases or bugs

* 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

* First crack at xdelta softpatching support

- There may be undiscovered edge cases or bugs

* Remove trailing commas from the enums I modified

- C89 doesn't allow them

* 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

* Add some RARCH_DBG calls for xdelta patching

* 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
2022-12-19 01:10:04 +01:00
libretroadmin
cc3169febe (runloop) Cleanups 2022-11-21 19:11:55 +01:00
libretroadmin
6815383113 * Create runloop_state_free (instead of duplicated code lines in
retroarch.c and runloop.c
* Turn a whole bunch of unctions in runloop.c static as a consequence
2022-11-21 17:45:39 +01:00
LibretroAdmin
18ea6fa81e Turn more boolean variables into flags for runloop
- Get rid of RARCH_CTL_IS_INITED, use runloop_get_flags instead
2022-10-24 18:16:00 +02:00
LibretroAdmin
e62abac647 Add BSV movie flags 2022-10-15 14:32:26 +02:00
sonninnos
bbd6c0ae9a
Add delay to savestate notifications (#14514) 2022-10-15 11:29:07 +02:00
LibretroAdmin
cc3a339011 (Runloop) Use more flags 2022-10-10 19:54:54 +02:00
LibretroAdmin
2371e5cbd2 (Runloop) Turn more bools into flags 2022-10-10 18:53:55 +02:00
LibretroAdmin
d100e73780 Use more runloop flags 2022-10-10 08:59:27 +02:00
LibretroAdmin
076a1a398c (Runloop) Turn some boolean variables into flags 2022-10-10 04:37:17 +02:00
Cthulhu-throwaway
2d1c238c1d
Special functions for core serialization (#14317) 2022-08-13 02:24:28 +02:00
libretroadmin
cd36af1d24 Use NAME_MAX_LENGTH for some char array variables that have a fixed
width of 256
2022-07-03 13:59:23 +02:00
barbudreadmon
e9d67f2bbe
savestates: implement an api call for context awareness (#14101) 2022-06-30 10:45:59 +02:00
jdgleaver
801b16885e Enable automatic configuration of 'VSync Swap Interval' 2022-05-12 14:22:46 +01:00
jdgleaver
a953b27614
Rework optional fast-forward frame skipping: Drop frames based on frame timing (#13578) 2022-01-31 16:32:17 +01:00
Tony
84f558db0b
Add optional frame skipping when fast-forwarding (#13550) 2022-01-26 18:30:33 +01:00
Tilman M. Jaeschke
682bbab233
[New Feature] Load save states from command-line or playlist (#13354)
* load save states from command-line or playlist

* load save states from command-line or playlist

* removed some brackets
2021-12-14 14:08:06 +01:00
Autechre
5bb4df3a42
Move translation task code to tasks/task_translation.c (#13274) 2021-11-22 15:19:20 +01:00
twinaphex
9982452c18 Move code from retroarch.c to runloop.c 2021-11-22 03:33:58 +01:00
Autechre
2b87cd9313
Create runloop.c and split up runloop code to this new file; (#13269)
* Create runloop.c and split up runloop code to this new file;
retroarch.c now 207Kb and runloop.c 301Kb

* Define empty runloop_secondary_core_destroy
2021-11-22 03:27:23 +01:00
twinaphex
b3a1a769b9 Move location state and camera state out of retroarch.c 2021-11-11 07:43:49 +01:00
twinaphex
0b768d0460 Split up recording code 2021-11-10 02:34:04 +01:00
twinaphex
174ab373e4 Move runloop prototypes to runloop.h 2021-11-10 01:22:32 +01:00
twinaphex
f671ce4f8c Move global->name to runloop_st 2021-11-09 06:03:00 +01:00
twinaphex
fe2c3a5310 Move state from retroarch_data.h over to retroarch.c 2021-11-09 05:16:51 +01:00
twinaphex
c912619653 * Move port_map to runloop_state
* Get rid of p_rarch dependencies in functions
2021-11-05 22:03:13 +01:00