From e5059a237a07a0aad9da593523a90244541a21a4 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 21 May 2017 10:34:50 +0200 Subject: [PATCH] Cleanups --- core.h | 2 +- core_impl.c | 11 ++--------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/core.h b/core.h index 0271a776e5..25a8265061 100644 --- a/core.h +++ b/core.h @@ -154,7 +154,7 @@ bool core_load(unsigned poll_type_behavior); bool core_unload(void); -bool core_set_default_callbacks(void *data); +bool core_set_default_callbacks(struct retro_callbacks *cbs); bool core_set_rewind_callbacks(void); diff --git a/core_impl.c b/core_impl.c index 6b6da31b17..974cf4fe4e 100644 --- a/core_impl.c +++ b/core_impl.c @@ -117,13 +117,8 @@ static bool core_init_libretro_cbs(struct retro_callbacks *cbs) * * Binds the libretro callbacks to default callback functions. **/ -bool core_set_default_callbacks(void *data) +bool core_set_default_callbacks(struct retro_callbacks *cbs) { - struct retro_callbacks *cbs = (struct retro_callbacks*)data; - - if (!cbs) - return false; - cbs->frame_cb = video_driver_frame; cbs->sample_cb = audio_driver_sample; cbs->sample_batch_cb = audio_driver_sample_batch; @@ -254,9 +249,7 @@ void core_uninit_symbols(void) bool core_init_symbols(enum rarch_core_type *type) { - if (!type) - return false; - if (!init_libretro_sym(*type, ¤t_core)) + if (!type || !init_libretro_sym(*type, ¤t_core)) return false; if (!current_core.retro_run)