183 Commits

Author SHA1 Message Date
warmenhoven
54055558f1
Fix several warnings (#15153) 2023-04-04 15:06:34 +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
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
sonninnos
3b129e6098
State slot hotkey adjustments (#14881) 2023-01-21 13:47:55 +01:00
libretroadmin
daa9e352cc Remove asserts 2023-01-09 00:51:05 +01:00
libretroadmin
04f510d503 Cleanup header includes 2022-12-05 15:10:19 +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
sonninnos
bbd6c0ae9a
Add delay to savestate notifications (#14514) 2022-10-15 11:29:07 +02:00
LibretroAdmin
91119d038f
(gfx_display/gfx_animation) Use flags instead of bools (#14488)
* (gfx_display/gfx_animation) Use flags instead of bools
* (task_save) Use flags instead of bools
2022-10-07 00:10:32 +02:00
LibretroAdmin
654203be0a (Autosave) Change/improve exit behavior of autosave thread -
if condition variable is signaled, the loop is ran another
last time so we can do a final check/save before stopping the thread.
Old commit courtesy of tobiasjakobi
2022-09-03 00:21:58 +02:00
LibretroAdmin
2463a63c78 (task_save.c) Miscellaneous cleanups:
* Remove unused return type of one function
* Remove some TODO/FIXME notes
* Small style nits
2022-09-02 23:35:48 +02:00
LibretroAdmin
61e24132bf (task_save.c) Simplification in control flow
(snprintf) Try to reduce or simplify snprintf calls, only tend to
use it for processing integers/numbers and avoid it for regular
string concatenation (NOTE: we try to be a bit safer about it to
address earlier cited criticism, although we don't consider concatenating
3 or 4 characters at the end to be insecure)
(msg_hash_to_str) Try to avoid duplicate calls to the same localized
string when we can just cache the results once instead locally
2022-08-27 07:55:02 +02:00
LibretroAdmin
da13fb0f48 Don't include errno.h in files that don't justify its use 2022-08-25 05:19:30 +02:00
sonninnos
ee8993c76a
Silence Linux snprintf warnings (#14131) 2022-07-02 14:08:27 +02:00
twinaphex
460f5e745d Silence some MSVC 2019 code analysis warnings 2022-03-05 14:39:56 +01:00
jdgleaver
42e03cae83
Disable save states based on save state support level defined in core info files (#13562) 2022-02-02 16:49:53 +01:00
jdgleaver
40925baacd Enable SRAM for contentless cores 2021-10-14 13:59:23 +01:00
Michael Burgardt
d8db234df0
Concatinate some previously truncated strings for easier translation (#12120) 2021-09-16 19:00:14 +02:00
bulzipke
8018be5c9b
Fix ram states to file when core deinit (#12956)
* Fix ram states to file when core deinit

* Fix unterminated state_path
Call CMD_EVENT_RAM_STATE_TO_FILE when CMD_EVENT_UNLOAD_CORE too
2021-09-08 18:01:07 +02:00
bulzipke
8adc24ecbc
(3DS) Add bottom screen menu (#12470)
* (3DS) Add bottom screen menu
 -> User can save/load state on botom screen with thumbnail.
 -> Call a save_state_to_file() when RAM state has data to write a disk.
 -> If the bottom screen needs updating, swap the bottom framebuffers.

Add: SAVE/LODE STATE TO RAM
 -> This is useful for devices with slow I/O
 -> 3DS bottom save state use CMD_EVENT_SAVE_STATE_TO_RAM
 -> 3DS bottom load state use CMD_EVENT_LOAD_STATE when RAM state has no data
 -> 3DS bottom load state use CMD_EVENT_LOAD_STATE_FROM_RAM when RAM sate has data

* Rewrite path_get_state to retroarch_get_current_savestate_path

* Fix unterminated state_path
2021-09-03 18:14:03 +02:00
twinaphex
13a2d2419f (PSL1GHT) Fix function prototype for 'button' pad driver
(Task save) Fix warning in platform port
2021-08-09 20:25:27 +02:00
twinaphex
b5d4c5b041 Silence -Wsizeof-pointer-memaccess warnings pointed out here -
https://travis-ci.org/github/libretro/RetroArch/jobs/764003625
2021-03-22 23:43:11 +01:00
twinaphex
6cc51fa5f5 task_load_handler - small cleanups 2021-03-17 10:40:47 +01:00
twinaphex
7e2113b405 (task_save.c) Allocate the string on heap instead of putting it on stack 2021-03-17 10:12:04 +01:00
CrystalCT
9ac61f9cc5 Add some PSL1GHT ifdefs 2021-03-17 08:46:02 +01:00
Jamiras
ba1d48fb6a ensure hardcore remains disabled through load process 2021-02-28 13:07:24 -07:00
Jamiras
1e39de800c
fix undo load state (#12062) 2021-02-21 22:50:27 +01:00
Jamiras
2280d126f3 address feedback 2021-02-18 07:44:52 -07:00
Jamiras
2d841715cb include achievement runtime state in save states 2021-02-17 19:44:39 -07:00
sonninnos
90485b5586 Savestate logging cleanup 2021-02-03 13:29:32 +02:00
twinaphex
870707dbe8 Remove obsolete __CELLOS_LV2__ references - use PSL1GHT instead 2020-12-19 15:32:26 +01:00
unknown
26559d635e fix segmentation faulf on PS3 when Load State 2020-11-07 01:42:58 +01:00
twinaphex
44b7234756 Move cheat_manager and state_manager to root folder 2020-10-15 05:29:20 +02:00
Tony Jansson
6918b4b5cb Savestate logging cleanup 2020-10-15 03:54:53 +03:00
Justin Weiss
fb9aa961b7 [3DS] Increase file buffer size and savestate chunk size 2020-09-09 18:29:47 -07:00
twinaphex
ad7db2e2b8 Move path variables off heap size; prevent potential memory
fragmentation
2020-08-18 12:44:14 +02:00
twinaphex
87c0fb6323 Struct reordering 2020-08-14 18:58:09 +02:00
Jamiras
9aa42c9d5e only wait for save task to complete 2020-07-10 20:18:03 -06:00
twinaphex
7862166ed2 Add back HAVE_SCREENSHOTS define from SSNES days 2020-07-01 17:47:13 +02:00
twinaphex
223d76680a Add HAVE_CHEATS ifdef 2020-06-30 19:35:55 +02:00
twinaphex
c2bc40bbc3 Update SRAM log messages 2020-06-08 17:57:40 +02:00
Autechre
30a4610b12
Merge pull request #10788 from jdgleaver/core-backup
Add option to backup/restore installed cores
2020-06-04 16:30:55 +02:00
twinaphex
9fda2bdebd Add TODO/FIXME comments 2020-06-04 14:09:45 +02:00
jdgleaver
0a33e562f4 Add option to backup/restore installed cores 2020-06-04 12:20:58 +01:00
twinaphex
6083450d4e Ensure save states are correctly flushed to disk when quitting RetroArch (fixes broken save states when exiting RetroArch - without first closing content - with 'Auto Save State' enabled) 2020-06-01 17:39:52 +02:00
twinaphex
9f9710beb6 Fix --disable-threads 2020-05-29 11:16:38 +02:00
twinaphex
a50fd86f3e Add global state warnings 2020-05-29 06:11:07 +02:00
jdgleaver
0d1fd657ab Add optional save (SRAM) file compression 2020-04-20 12:48:40 +01:00