rewind.c - get rid of global_t dependency

This commit is contained in:
twinaphex 2015-12-01 00:19:15 +01:00
parent a6d8d28895
commit 508f1f594f
3 changed files with 5 additions and 2 deletions

View File

@ -344,6 +344,9 @@ bool bsv_movie_ctl(enum bsv_ctl_state state, void *data)
case BSV_MOVIE_CTL_SET_FRAME_END:
bsv_movie_set_frame_end(global->bsv.movie);
break;
case BSV_MOVIE_CTL_FRAME_REWIND:
bsv_movie_frame_rewind(global->bsv.movie);
break;
default:
return false;
}

View File

@ -50,6 +50,7 @@ enum bsv_ctl_state
BSV_MOVIE_CTL_UNSET_PLAYBACK,
BSV_MOVIE_CTL_SET_FRAME_START,
BSV_MOVIE_CTL_SET_FRAME_END,
BSV_MOVIE_CTL_FRAME_REWIND,
BSV_MOVIE_CTL_DEINIT,
BSV_MOVIE_CTL_INIT,
BSV_MOVIE_CTL_END,

View File

@ -654,7 +654,6 @@ void state_manager_event_deinit(void)
void state_manager_check_rewind(bool pressed)
{
static bool first = true;
global_t *global = global_get_ptr();
settings_t *settings = config_get_ptr();
if (state_manager_frame_is_reversed())
@ -686,7 +685,7 @@ void state_manager_check_rewind(bool pressed)
core.retro_unserialize(buf, rewind_state.size);
if (bsv_movie_ctl(BSV_MOVIE_CTL_IS_INITED, NULL))
bsv_movie_frame_rewind(global->bsv.movie);
bsv_movie_ctl(BSV_MOVIE_CTL_FRAME_REWIND, NULL);
}
else
rarch_main_msg_queue_push_new(MSG_REWIND_REACHED_END,