mirror of
https://github.com/libretro/RetroArch.git
synced 2025-01-10 02:30:52 +00:00
(menu_cbs_get_value.c) cleanup some code
This commit is contained in:
parent
23745e6c4c
commit
177f6104d4
@ -523,17 +523,19 @@ static void menu_action_setting_disp_set_label_menu_disk_index(
|
|||||||
unsigned images = 0, current = 0;
|
unsigned images = 0, current = 0;
|
||||||
global_t *global = global_get_ptr();
|
global_t *global = global_get_ptr();
|
||||||
const struct retro_disk_control_callback *control =
|
const struct retro_disk_control_callback *control =
|
||||||
|
global ?
|
||||||
(const struct retro_disk_control_callback*)
|
(const struct retro_disk_control_callback*)
|
||||||
&global->system.disk_control;
|
&global->system.disk_control : NULL;
|
||||||
|
|
||||||
|
if (!control)
|
||||||
|
return;
|
||||||
|
|
||||||
*w = 19;
|
*w = 19;
|
||||||
*s = '\0';
|
*s = '\0';
|
||||||
strlcpy(s2, path, len2);
|
strlcpy(s2, path, len2);
|
||||||
if (!control)
|
|
||||||
return;
|
|
||||||
|
|
||||||
images = control->get_num_images();
|
images = control ? control->get_num_images() : 0;
|
||||||
current = control->get_image_index();
|
current = control ? control->get_image_index() : 0;
|
||||||
|
|
||||||
if (current >= images)
|
if (current >= images)
|
||||||
strlcpy(s, menu_hash_to_str(MENU_VALUE_NO_DISK), len);
|
strlcpy(s, menu_hash_to_str(MENU_VALUE_NO_DISK), len);
|
||||||
|
Loading…
Reference in New Issue
Block a user