Don't autoload states if a BSV file is being played back or recorded (#14877)

- Moved BSV initialization before autoload code
- Don't trigger autoload code if there is bsv movie state

Open question: What's the difference between entry state and autoload
state? Should BSV recording use the entry state even if playback does
not?

Co-authored-by: Joseph C. Osborn <jcoa2018@pomona.edu>
This commit is contained in:
Joe Osborn 2023-01-20 15:15:14 -08:00 committed by GitHub
parent 3abd6f12f3
commit 17c7e8744e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 9 deletions

View File

@ -4053,6 +4053,16 @@ static bool event_init_content(
RARCH_LOG("[SRAM]: %s\n", RARCH_LOG("[SRAM]: %s\n",
msg_hash_to_str(MSG_SKIPPING_SRAM_LOAD)); msg_hash_to_str(MSG_SKIPPING_SRAM_LOAD));
#ifdef HAVE_BSV_MOVIE
bsv_movie_deinit(input_st);
if (bsv_movie_init(input_st))
{
/* Set granularity upon success */
configuration_set_uint(settings,
settings->uints.rewind_granularity, 1);
}
#endif
/* /*
Since the operations are asynchronous we can't Since the operations are asynchronous we can't
guarantee users will not use auto_load_state to cheat on guarantee users will not use auto_load_state to cheat on
@ -4062,6 +4072,9 @@ static bool event_init_content(
*/ */
#ifdef HAVE_CHEEVOS #ifdef HAVE_CHEEVOS
if (!cheevos_enable || !cheevos_hardcore_mode_enable) if (!cheevos_enable || !cheevos_hardcore_mode_enable)
#endif
#ifdef HAVE_BSV_MOVIE
if (!input_st->bsv_movie_state_handle)
#endif #endif
{ {
if (runloop_st->entry_state_slot && !command_event_load_entry_state(settings)) if (runloop_st->entry_state_slot && !command_event_load_entry_state(settings))
@ -4070,15 +4083,6 @@ static bool event_init_content(
command_event_load_auto_state(); command_event_load_auto_state();
} }
#ifdef HAVE_BSV_MOVIE
bsv_movie_deinit(input_st);
if (bsv_movie_init(input_st))
{
/* Set granularity upon success */
configuration_set_uint(settings,
settings->uints.rewind_granularity, 1);
}
#endif
command_event(CMD_EVENT_NETPLAY_INIT, NULL); command_event(CMD_EVENT_NETPLAY_INIT, NULL);
return true; return true;