Fix compilation problem when HAVE_BSV_MOVIE is not defined

This commit is contained in:
twinaphex 2021-09-09 16:58:52 +02:00
parent 6a310ecfed
commit 8564b4f8e3
3 changed files with 13 additions and 5 deletions

View File

@ -948,7 +948,7 @@ bool command_event_save_auto_state(
void command_event_init_cheats( void command_event_init_cheats(
bool apply_cheats_after_load, bool apply_cheats_after_load,
const char *path_cheat_db, const char *path_cheat_db,
bsv_movie_t *bsv_movie_state_handle) void *bsv_movie_data)
{ {
#ifdef HAVE_NETWORKING #ifdef HAVE_NETWORKING
bool allow_cheats = !netplay_driver_ctl( bool allow_cheats = !netplay_driver_ctl(
@ -957,6 +957,8 @@ void command_event_init_cheats(
bool allow_cheats = true; bool allow_cheats = true;
#endif #endif
#ifdef HAVE_BSV_MOVIE #ifdef HAVE_BSV_MOVIE
bsv_movie_t *
bsv_movie_state_handle = (bsv_movie_t*)bsv_movie_data;
allow_cheats &= !(bsv_movie_state_handle != NULL); allow_cheats &= !(bsv_movie_state_handle != NULL);
#endif #endif

View File

@ -382,7 +382,7 @@ bool command_set_shader(command_t *cmd, const char *arg);
void command_event_init_cheats( void command_event_init_cheats(
bool apply_cheats_after_load, bool apply_cheats_after_load,
const char *path_cheat_db, const char *path_cheat_db,
bsv_movie_t *bsv_movie_state_handle); void *bsv_movie_data);
#endif #endif
#if defined(HAVE_COMMAND) #if defined(HAVE_COMMAND)

View File

@ -30392,9 +30392,15 @@ bool retroarch_main_init(int argc, char *argv[])
#ifdef HAVE_CHEATS #ifdef HAVE_CHEATS
cheat_manager_state_free(); cheat_manager_state_free();
command_event_init_cheats(settings->bools.apply_cheats_after_load, command_event_init_cheats(
settings->bools.apply_cheats_after_load,
settings->paths.path_cheat_database, settings->paths.path_cheat_database,
p_rarch->bsv_movie_state_handle); #ifdef HAVE_BSV_MOVIE
p_rarch->bsv_movie_state_handle
#else
NULL
#endif
);
#endif #endif
drivers_init(p_rarch, settings, DRIVERS_CMD_ALL, verbosity_enabled); drivers_init(p_rarch, settings, DRIVERS_CMD_ALL, verbosity_enabled);
#ifdef HAVE_COMMAND #ifdef HAVE_COMMAND