Commit graph

81 commits

Author SHA1 Message Date
David G. F ab376eb669
Make auto-savestates not use the task queue (#16061)
Auto savestate (and its optional thumbnail) is generated on core unload
(quit, netplay start, etc). This ends up using the task-queue, which in
many cases deadlocks and/or causes a crash due to its asynchronous
nature.

Given that this is a state that must be generated before quiting or
reloading the core, it makes no sense to use the task queue, it should
be a synchronous job like for instance SRAM saving.

This should fix #15248 (tested by @schmurtzm)
2023-12-30 21:44:15 -08:00
David G. F ea87495a4e
Save improvements (#16053)
* Simplify autosave command function

* Simplify and split save and savestate logic

save.c contains "SRAM" saves and their logic, which uses no task/queue.
2023-12-28 11:10:46 -08: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 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 479e3b23d9 Turn content_get_status into content_get_flags 2022-10-09 20:32:39 +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
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
jdgleaver 55c855267e Add API extension for setting 'need_fullpath' based on content file extension and to request persistent frontend content data buffers 2021-06-01 15:28:39 +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
twinaphex b8058a93e1 Reorder structs, alignment 2020-08-15 23:10:31 +02:00
Jamiras 9aa42c9d5e only wait for save task to complete 2020-07-10 20:18:03 -06:00
twinaphex b74b8b6a6c Move launched_from_cli to global state 2020-06-13 08:19:49 +02: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
jdgleaver 0d1fd657ab Add optional save (SRAM) file compression 2020-04-20 12:48:40 +01:00
radius d08779adf0 [subsystem] add a function to get the friendly name 2019-04-11 18:51:27 -05:00
Brad Parker 4f0d61a2ac update copyright 2019-02-22 19:13:36 -05:00
radius dad3fe42db [netplay] load subsystem content
cleanup

cleanup
2019-01-14 18:58:57 -05:00
orbea 7eead5c59f Fix crashes with '--disable-menu' and the Qt frontend.
When failing to load content in the companion ui when HAVE_MENU is not
defined RetroArch will crash in just about every input and video driver.
Even if several sanity checks are added the dummy core will immediately
exit.

Now it will print that it failed to load the core in the companion ui
and reinit the dummy core to match the behavior with the null menu
driver.
2019-01-09 10:02:32 -08:00
radius 319124c7a0 subsystem: remember last used folder 2018-12-16 12:33:27 -05:00
twinaphex f050104740 Change return type of content_get_subsystem_rom_id 2018-04-17 03:19:35 +02:00
radius d254c3eca4 subsystem part 3: fix saves 2018-02-12 02:39:26 -05:00
radius 9a23ee8017 subsystem part 3: remove more globals 2018-02-12 02:39:25 -05:00
radius 2a9046c06f subsystem part 3: cleanups 2018-02-12 02:39:25 -05:00
radius 9730fa5c51 subsystem part 2: load content! hacky 2018-02-12 02:39:25 -05:00
radius 752e729ec2 subsystem part 2: set paths 2018-02-12 02:39:24 -05:00
radius b212640732 subsystem part 2: add a wrapper to set the current subsystem 2018-02-12 02:39:24 -05:00
radius 597e0ce1ec subsystem part 1: get the required data to load content 2018-02-12 02:39:23 -05:00
twinaphex de80671658 Simplify content_get_crc 2017-05-06 16:41:22 +02:00
twinaphex 8c89ec158c Update copyrights 2017-03-22 03:09:18 +01:00
twinaphex 018cb7ebe6 Add another parameter to content_get_status 2017-01-25 15:51:57 +01:00
twinaphex 361bd471de Create content_get_status 2017-01-25 15:44:21 +01:00
Brad Parker d1d5584d18 update copyright 2016-10-27 11:47:10 -04:00
Brad Parker 97a5e77181 mute state-related OSD messages when auto-saving 2016-10-04 17:58:16 -04:00
Brad Parker eac3ca770a load/save state are now actual tasks 2016-10-02 19:05:30 -04:00
twinaphex cef2d57629 Cleanups 2016-09-01 04:59:56 +02:00
twinaphex f51dfa1de9 Cleanups 2016-06-30 06:11:55 +02:00
Arzed Five 8e20b9e938 Both Undo options now write distinct messages in the OSD when buffers
are empty, when undoing fails and when undoing is successful.

Aside from some TODO/FIXME areas added by this fork, the features in the
fork are now complete.
2016-06-10 20:12:43 +01:00
radius 4ad2eba602 cleanups 2016-06-08 23:02:19 -05:00
Arzed Five 9944ec98fd Both undo options print messages now. Undo Load State can now also be
undone ad infinitum. Doing it in succession swaps the current state for
the backed up state.
2016-06-09 00:38:27 +01:00
Arzed Five 051cc3fe4d Undo Save State currently seems to be working almost as intended
(missing OSD messages). Undo Load State isn't working yet.
2016-06-08 20:27:54 +01:00
Arzed Five c47b58228f Make this compile 2016-06-08 17:07:04 +01:00
Arzed Five 70b1f385e8 Change task_save_state so we save a single state and a single savestate
file in memory, allowing to undo a loadstate/savestate once.
2016-06-07 18:33:01 +01:00
radius 28aafddd91 copy the old save state before making a new savestate 2016-06-04 12:38:55 -05:00
radius a86cf6b99d initial implementation of undo save state 2016-06-02 23:33:52 -05:00
twinaphex ff8d00e12b Use RETRO_BEGIN_DECLS/RETRO_END_DECLS in more files 2016-06-03 03:22:35 +02:00
twinaphex 2559139154 Cleanup tasks_save_ram.c 2016-05-17 15:32:50 +02:00
twinaphex 4a0334b4fa Turn content_push_to_history_playlist to static function 2016-05-17 15:22:26 +02:00
twinaphex 6305f12ba2 Turn content_load function static 2016-05-16 16:44:34 +02:00