From d80b85b1583b16cc9a3b0f859a8367c658008172 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 14 Jul 2019 18:52:51 +0200 Subject: [PATCH] Cleanups --- retroarch.c | 2 +- tasks/task_content.c | 27 +++++++++++++-------------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/retroarch.c b/retroarch.c index 3300eb0293..76affa8ad9 100644 --- a/retroarch.c +++ b/retroarch.c @@ -15357,7 +15357,7 @@ bool video_context_driver_get_refresh_rate(float *refresh_rate) if (refresh_rate) refresh_holder = current_video_context.get_refresh_rate(video_context_data); - if (refresh_holder != video_driver_core_hz) /* Fix for incorrect interlace detsction -- HARD SET VSNC TO REQUIRED REFRESH FOR CRT*/ + if (refresh_holder != video_driver_core_hz) /* Fix for incorrect interlacing detection -- HARD SET VSNC TO REQUIRED REFRESH FOR CRT*/ *refresh_rate = video_driver_core_hz; } diff --git a/tasks/task_content.c b/tasks/task_content.c index b5c5672d30..791664f6eb 100644 --- a/tasks/task_content.c +++ b/tasks/task_content.c @@ -1363,19 +1363,15 @@ static void task_push_to_history_list( break; default: { -#ifdef HAVE_MENU - menu_handle_t *menu = NULL; -#endif core_info_t *core_info = NULL; - - /* Set core path */ - core_path = path_get(RARCH_PATH_CORE); - /* Set core display name * (As far as I can tell, core_info_get_current_core() * should always provide a valid pointer here...) */ core_info_get_current_core(&core_info); + /* Set core path */ + core_path = path_get(RARCH_PATH_CORE); + if (core_info) core_name = core_info->display_name; @@ -1383,15 +1379,18 @@ static void task_push_to_history_list( core_name = info->library_name; #ifdef HAVE_MENU - /* Set database name + checksum */ - if (menu_driver_ctl(RARCH_MENU_CTL_DRIVER_DATA_GET, &menu)) { - playlist_t *playlist_curr = playlist_get_cached(); - - if (playlist_index_is_valid(playlist_curr, menu->rpl_entry_selection_ptr, tmp, core_path)) + menu_handle_t *menu = NULL; + /* Set database name + checksum */ + if (menu_driver_ctl(RARCH_MENU_CTL_DRIVER_DATA_GET, &menu)) { - playlist_get_crc32(playlist_curr, menu->rpl_entry_selection_ptr, &crc32); - playlist_get_db_name(playlist_curr, menu->rpl_entry_selection_ptr, &db_name); + playlist_t *playlist_curr = playlist_get_cached(); + + if (playlist_index_is_valid(playlist_curr, menu->rpl_entry_selection_ptr, tmp, core_path)) + { + playlist_get_crc32(playlist_curr, menu->rpl_entry_selection_ptr, &crc32); + playlist_get_db_name(playlist_curr, menu->rpl_entry_selection_ptr, &db_name); + } } } #endif