Commit Graph

2162 Commits

Author SHA1 Message Date
warmenhoven
54055558f1
Fix several warnings (#15153) 2023-04-04 15:06:34 +01:00
Valentin
b0b5a40d44
add overlay parameter to control x/y separation in auto-scale mode (#15106) 2023-03-31 01:33:39 +01:00
libretroadmin
2902d11b1a Rewinding code should not be a forced built-in dependency 2023-03-17 16:08:41 +01:00
Joe Osborn
be5b198692
Replay rewind fix (#15079)
* 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?
2023-03-11 18:37:48 +01:00
Joe Osborn
807640fed3
Associate states with replays (#15070)
* 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>
2023-03-08 00:10:59 +01:00
Joe Osborn
4d81f70f00
Replay nomenclature (#15054)
* change bsv file suffix to replay, update strings

* Fix bsv cli args

* Fix help whitespace

* Fix another message

---------

Co-authored-by: Joseph C. Osborn <jcoa2018@pomona.edu>
2023-03-03 23:16:48 +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
libretroadmin
4fa19e552a CXX_BUILD buildfixes 2023-02-23 17:09:45 +01:00
libretroadmin
7ebab640d7 Cleanups/style nits 2023-02-23 13:15:14 +01:00
libretroadmin
8eff57f4d6 (task_movie) Cleanups/style nits 2023-02-21 11:10:25 +01:00
serakeri
347ea8157c
Various memory access fixes to prevent crashes (#14459) (#15000)
Prevent double free and null dereference when the controller is quickly reconnected.
Handle error when controller device query returns null instead of crashing.
2023-02-21 06:09:36 +01:00
libretroadmin
1d9cb216ca Silence some warnings/LTO issues 2023-02-19 10:21:37 +01:00
Joe Osborn
23976e9b44
Fix bsv playback from a starting state for dosbox (#14939)
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>
2023-02-02 20:44:30 +01:00
Joe Osborn
5dbdde4316
BSV ergonomics improvements (#14929)
* 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>
2023-01-31 05:34:26 +01:00
Joe Osborn
f149519351
Allow for both -e and -R to start a BSV file recording at a state (#14898)
* 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>
2023-01-25 07:15:32 +01:00
libretroadmin
61c986ddfa Buildfix 2023-01-22 21:44:39 +01:00
libretroadmin
e798f99fea Several RARCH_CTL switches don't belong to retroarch state but
runloop state, hence remove
2023-01-22 20:16:14 +01:00
libretroadmin
378e90e745 retroarch.h functions should be namespaced 'retroarch_' instead
of 'rarch_'
2023-01-22 16:58:22 +01:00
libretroadmin
01c3684b10 Cleanups - try to remove stdio.h include where possible 2023-01-21 22:25:38 +01:00
sonninnos
3b129e6098
State slot hotkey adjustments (#14881) 2023-01-21 13:47:55 +01:00
sonninnos
127c676048
Cleanup runloop_environment logging + readability (#14855) 2023-01-16 01:49:25 +01:00
libretroadmin
daa9e352cc Remove asserts 2023-01-09 00:51:05 +01:00
gouchi
ec2805a562
Report error when core download failed (#14824)
Fix curly bracket opening
2023-01-08 19:32:47 +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
3277d7b8fa (Emscripten) Add HAVE_PATCH support for Emscripten
(Patch) if HAVE_PATCH is not defined, silence warnings
2023-01-07 05:15:36 +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
0c42e339e1 Silence some warnings that popup in Xcode 2023-01-04 18:42:35 +01:00
zoltanvb
1334bd0408
Localization improvements. (#14753)
- enable localization of audio mixer sublabel
- resolve 2 localization FIXME items
- enable better localization of controller connect/disconnect/config messages
2022-12-22 16:54:14 +01:00
LibretroAdmin
f5133d8cc4
Revert "Add Xdelta support for softpatching (#14706)" (#14743)
This reverts commit aaad220836.
2022-12-19 03:29:46 +01:00
libretroadmin
7a4a860680 Revert "Don't rely on ENOSPC - relies on errno.h"
This reverts commit f6c2e4d292.
2022-12-19 03:22:07 +01:00
libretroadmin
f6c2e4d292 Don't rely on ENOSPC - relies on errno.h 2022-12-19 03:17:09 +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
573a82c0c8 Buildfix for Miyoo 2022-12-05 15:46:44 +01:00
libretroadmin
2c42912185 More header cleanups 2022-12-05 15:15:07 +01:00
libretroadmin
04f510d503 Cleanup header includes 2022-12-05 15:10:19 +01:00
neil4
3b0db75782
Overlay cleanups; replace bools with flags (#14661) 2022-11-22 18:29:11 +01:00
sonninnos
10a74657c3
Move SRAM init to content init (#14653) 2022-11-21 15:24:58 +01:00
neil4
3de186e374
Overlays: Ignore hitboxes with zero area (#14619)
I.e. Set 'reach_x' or 'reach_y' to zero to ensure no hitbox math is done

nits
2022-11-13 10:46:41 +01:00
sonninnos
68401205f2
Add option for pause on controller disconnect (#14601) 2022-11-08 12:46:09 +01:00
sonninnos
954d1bf605
Driver independent disconnection notification (#14600) 2022-11-07 05:51:37 -08:00
sonninnos
9796024f3d
(XInput) Ensure disconnection notification (#14592)
* (XInput) Ensure disconnection notification

* Prefer display_name in autoconfig disconnect notification
2022-11-06 02:34:03 +01:00
neil4
b47fb0b807
Overlays: Add 'reach' and 'exclusive' for hitboxes (#14591)
Allows stretching hitboxes and handling their overlap

reach_up, reach_down, reach_left, reach_right:
- Stretches in one direction:
reach_x, reach_y
- Stretches symmetrically

exclusive:
- If true, blocks input from overlapped hitboxes
range_mod_exclusive:
- Similar, but only applies when this hitbox is extended by range_mod
- After range_mod takes effect, has priority over 'exclusive'

E.g. This creates a D-Pad area and extends its hitbox left & right 50%, up 15%, and down 30%. Then applies range_mod_exclusive:
overlay0_desc0 = "dpad_area,0.15,0.57,rect,0.166228,0.295516"
overlay0_desc0_reach_x = 1.5
overlay0_desc0_reach_up = 1.15
overlay0_desc0_reach_down = 1.3
overlay0_desc0_range_mod = 2.0
overlay0_desc0_range_mod_exclusive = true
2022-11-05 21:32:22 +01:00
LibretroAdmin
db6e0b1f42 Removed credits - requested by author 2022-11-01 21:40:13 +01:00
LibretroAdmin
07378abbdf (task_save) Use flags instead of booleans
(task_screenshot) Start reducing amount of parameters
2022-10-30 18:41:41 +01:00
AKuHAK
c3914d1c85
(database) Added serial scanning for PS2 (#14566)
reworked ps1 magic numbers
PS1 scan: fixed not scanned LSP titles, added PSX.EXE titles, extended ps1 serial variations
2022-10-30 17:21:48 +01:00
neil4
2de52baf74
Overlays: Add eightway area types (#14565)
- New descriptors: 'dpad_area' and 'abxy_area'
- Each has a diagonal sensitivity setting, 100% being 8-way symmetry
- Buttons can be redefined in the cfg file

E.g. This would create a d-pad area, then redefine it to use analog directions:
overlay0_desc0 = "dpad_area,0.85,0.57,rect,0.166228,0.295516"
overlay0_desc0_up = "r_y_minus"
overlay0_desc0_down = "r_y_plus"
overlay0_desc0_left = "r_x_minus"
overlay0_desc0_right = "r_x_plus"
2022-10-30 06:31:27 +01:00
neil4
1dd165a3bf
Fix overlay next_index for unnamed targets (#14562) 2022-10-29 16:33:34 +02:00
LibretroAdmin
44cb5be2ef (task_content.c) Cut down on code duplication 2022-10-25 16:32:16 +02:00
sonninnos
03c901dfb8
Playlist + database changes: (#14531)
- Cleanup 'entry_slot'
- Fallback label + logging
2022-10-18 21:32:54 +02:00