diff --git a/retroarch.c b/retroarch.c index 2a3571b22b..1ee19f6267 100644 --- a/retroarch.c +++ b/retroarch.c @@ -2160,7 +2160,7 @@ static void check_rewind(void) if (input_key_pressed_func(RARCH_REWIND)) { msg_queue_clear(g_extern.msg_queue); - void *buf; + const void *buf; if (state_manager_pop(g_extern.state_manager, &buf)) { g_extern.frame_is_reverse = true; diff --git a/rewind.c b/rewind.c index ed189761e1..313a7b9cbf 100644 --- a/rewind.c +++ b/rewind.c @@ -161,7 +161,7 @@ void state_manager_free(state_manager_t *state) free(state); } -bool state_manager_pop(state_manager_t *state, void **data) +bool state_manager_pop(state_manager_t *state, const void **data) { *data = NULL; @@ -219,8 +219,8 @@ void state_manager_push_where(state_manager_t *state, void **data) // end up applying a 'patch' to wrong savestate, and that'd blow up rather quickly. if (!state->thisblock_valid) { - void *ignore; - if (state_manager_pop(state, &ignore)) + const void *ignored; + if (state_manager_pop(state, &ignored)) { state->thisblock_valid = true; } diff --git a/rewind.h b/rewind.h index 74f66e8081..d7e3929800 100644 --- a/rewind.h +++ b/rewind.h @@ -23,7 +23,7 @@ typedef struct state_manager state_manager_t; state_manager_t *state_manager_new(size_t state_size, size_t buffer_size); void state_manager_free(state_manager_t *state); -bool state_manager_pop(state_manager_t *state, void **data); +bool state_manager_pop(state_manager_t *state, const void **data); void state_manager_push_where(state_manager_t *state, void **data); void state_manager_push_do(state_manager_t *state); void state_manager_capacity(state_manager_t *state, unsigned int *entries, size_t *bytes, bool *full);