From 7841b639ecceebc3e8024125a4f302aec52b3337 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 5 Mar 2020 13:35:55 +0100 Subject: [PATCH] (Ozone) Header cleanups --- menu/drivers/ozone/ozone.c | 8 +--- menu/drivers/ozone/ozone.h | 3 -- menu/drivers/ozone/ozone_display.c | 1 - menu/drivers/ozone/ozone_texture.c | 71 +++++++++++++++--------------- menu/drivers/ozone/ozone_theme.h | 2 - menu/drivers/xmb.c | 9 ++-- 6 files changed, 42 insertions(+), 52 deletions(-) diff --git a/menu/drivers/ozone/ozone.c b/menu/drivers/ozone/ozone.c index b2d23cbee3..09d6f025a8 100644 --- a/menu/drivers/ozone/ozone.c +++ b/menu/drivers/ozone/ozone.c @@ -35,11 +35,8 @@ #include #include -#include "../../menu_driver.h" #include "../../../gfx/gfx_animation.h" #include "../../../gfx/gfx_display.h" -#include "../../menu_input.h" -#include "../../playlist.h" #include "../../runtime_file.h" #include "../../input/input_osk.h" @@ -47,14 +44,11 @@ #include "../../../configuration.h" #include "../../../content.h" #include "../../../core_info.h" -#include "../../../core.h" #include "../../../verbosity.h" -#include "../../../tasks/tasks_internal.h" -#include "../../../dynamic.h" ozone_node_t *ozone_alloc_node(void) { - ozone_node_t *node = (ozone_node_t*)malloc(sizeof(*node)); + ozone_node_t *node = (ozone_node_t*)malloc(sizeof(*node)); node->height = 0; node->position_y = 0; diff --git a/menu/drivers/ozone/ozone.h b/menu/drivers/ozone/ozone.h index 3bb733ce34..f85979e96f 100644 --- a/menu/drivers/ozone/ozone.h +++ b/menu/drivers/ozone/ozone.h @@ -26,9 +26,6 @@ typedef struct ozone_handle ozone_handle_t; #include "../../gfx/gfx_thumbnail_path.h" #include "../../gfx/gfx_thumbnail.h" -#include "../../menu_driver.h" - -#include "../../../retroarch.h" #define ANIMATION_PUSH_ENTRY_DURATION 166 #define ANIMATION_CURSOR_DURATION 133 diff --git a/menu/drivers/ozone/ozone_display.c b/menu/drivers/ozone/ozone_display.c index be9993bcc0..afaaad5525 100644 --- a/menu/drivers/ozone/ozone_display.c +++ b/menu/drivers/ozone/ozone_display.c @@ -27,7 +27,6 @@ #include #include -#include "../../menu_input.h" #include "../../../gfx/gfx_animation.h" #include "../../../input/input_osk.h" diff --git a/menu/drivers/ozone/ozone_texture.c b/menu/drivers/ozone/ozone_texture.c index d55736ab4a..aa6b712e27 100644 --- a/menu/drivers/ozone/ozone_texture.c +++ b/menu/drivers/ozone/ozone_texture.c @@ -23,9 +23,10 @@ #include #include -#include "../../menu_driver.h" - +#ifdef HAVE_CHEEVOS #include "../../../cheevos-new/badges.h" +#endif + #include "../../../verbosity.h" uintptr_t ozone_entries_icon_get_texture(ozone_handle_t *ozone, @@ -431,21 +432,21 @@ uintptr_t ozone_entries_icon_get_texture(ozone_handle_t *ozone, if (type < MENU_SETTINGS_INPUT_DESC_BEGIN) { input_id = MENU_SETTINGS_INPUT_BEGIN; - if ( type == input_id + 1) + if (type == input_id + 1) return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_ADC]; - if ( type == input_id + 2) + if (type == input_id + 2) return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_SETTINGS]; - if ( type == input_id + 3) + if (type == input_id + 3) return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_BIND_ALL]; - if ( type == input_id + 4) + if (type == input_id + 4) return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_RELOAD]; - if ( type == input_id + 5) + if (type == input_id + 5) return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_SAVING]; - if ( type == input_id + 6) + if (type == input_id + 6) return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_MOUSE]; if ((type > (input_id + 30)) && (type < (input_id + 42))) return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_LGUN]; - if ( type == input_id + 42) + if (type == input_id + 42) return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_TURBO]; /* align to use the same code of Quickmenu controls*/ input_id = input_id + 7; @@ -455,58 +456,56 @@ uintptr_t ozone_entries_icon_get_texture(ozone_handle_t *ozone, /* Quickmenu controls repeats the same icons for all users*/ input_id = MENU_SETTINGS_INPUT_DESC_BEGIN; while (type > (input_id + 23)) - { - input_id = (input_id + 24) ; - } + input_id = (input_id + 24); } /* This is utilized for both Input Binds and Quickmenu controls*/ - if ( type == input_id ) + if (type == input_id ) return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_BTN_D]; - if ( type == (input_id + 1)) + if (type == (input_id + 1)) return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_BTN_L]; - if ( type == (input_id + 2)) + if (type == (input_id + 2)) return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_SELECT]; - if ( type == (input_id + 3)) + if (type == (input_id + 3)) return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_START]; - if ( type == (input_id + 4)) + if (type == (input_id + 4)) return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_DPAD_U]; - if ( type == (input_id + 5)) + if (type == (input_id + 5)) return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_DPAD_D]; - if ( type == (input_id + 6)) + if (type == (input_id + 6)) return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_DPAD_L]; - if ( type == (input_id + 7)) + if (type == (input_id + 7)) return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_DPAD_R]; - if ( type == (input_id + 8)) + if (type == (input_id + 8)) return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_BTN_R]; - if ( type == (input_id + 9)) + if (type == (input_id + 9)) return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_BTN_U]; - if ( type == (input_id + 10)) + if (type == (input_id + 10)) return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_LB]; - if ( type == (input_id + 11)) + if (type == (input_id + 11)) return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_RB]; - if ( type == (input_id + 12)) + if (type == (input_id + 12)) return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_LT]; - if ( type == (input_id + 13)) + if (type == (input_id + 13)) return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_RT]; - if ( type == (input_id + 14)) + if (type == (input_id + 14)) return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_STCK_P]; - if ( type == (input_id + 15)) + if (type == (input_id + 15)) return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_STCK_P]; - if ( type == (input_id + 16)) + if (type == (input_id + 16)) return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_STCK_R]; - if ( type == (input_id + 17)) + if (type == (input_id + 17)) return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_STCK_L]; - if ( type == (input_id + 18)) + if (type == (input_id + 18)) return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_STCK_D]; - if ( type == (input_id + 19)) + if (type == (input_id + 19)) return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_STCK_U]; - if ( type == (input_id + 20)) + if (type == (input_id + 20)) return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_STCK_R]; - if ( type == (input_id + 21)) + if (type == (input_id + 21)) return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_STCK_L]; - if ( type == (input_id + 22)) + if (type == (input_id + 22)) return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_STCK_D]; - if ( type == (input_id + 23)) + if (type == (input_id + 23)) return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_STCK_U]; } return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_SUBSETTING]; diff --git a/menu/drivers/ozone/ozone_theme.h b/menu/drivers/ozone/ozone_theme.h index c538bb51d2..97caba5350 100644 --- a/menu/drivers/ozone/ozone_theme.h +++ b/menu/drivers/ozone/ozone_theme.h @@ -20,8 +20,6 @@ #include "ozone.h" #include "ozone_texture.h" -#include "../../../retroarch.h" - static float ozone_pure_white[16] = { 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index 0880b36d49..ea87a34ddb 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -1390,7 +1390,8 @@ static void xmb_selection_pointer_changed( } else { - settings_t *settings = config_get_ptr(); + settings_t *settings = config_get_ptr(); + unsigned menu_xmb_animation_move_up_down = settings->uints.menu_xmb_animation_move_up_down; /* Move up/down animation */ gfx_animation_ctx_entry_t anim_entry; @@ -1400,7 +1401,7 @@ static void xmb_selection_pointer_changed( anim_entry.tag = tag; anim_entry.cb = NULL; - switch (settings->uints.menu_xmb_animation_move_up_down) + switch (menu_xmb_animation_move_up_down) { case 0: anim_entry.duration = XMB_DELAY; @@ -4300,6 +4301,7 @@ static void xmb_frame(void *data, video_frame_info_t *video_info) float fade_tab_icons_x_threshold = 0.0f; bool menu_core_enable = settings->bools.menu_core_enable; float thumbnail_scale_factor = (float)settings->uints.menu_xmb_thumbnail_scale_factor / 100.0f; + bool menu_xmb_vertical_thumbnails = settings->bools.menu_xmb_vertical_thumbnails; if (!xmb) return; @@ -4451,7 +4453,7 @@ static void xmb_frame(void *data, video_frame_info_t *video_info) { /* Check if user has selected vertically * stacked thumbnails */ - if (settings->bools.menu_xmb_vertical_thumbnails) + if (menu_xmb_vertical_thumbnails) { /* Right + left thumbnails, right side */ if (show_right_thumbnail && show_left_thumbnail) @@ -5198,6 +5200,7 @@ static void *xmb_init(void **userdata, bool video_is_threaded) xmb->system_tab_end = 0; xmb->tabs[xmb->system_tab_end] = XMB_SYSTEM_TAB_MAIN; + if (settings->bools.menu_content_show_settings && !settings->bools.kiosk_mode_enable) xmb->tabs[++xmb->system_tab_end] = XMB_SYSTEM_TAB_SETTINGS; if (settings->bools.menu_content_show_favorites)