diff --git a/gfx/drivers/gl_common.c b/gfx/drivers/gl_common.c index 7b908cfaee..36d2ccfe81 100644 --- a/gfx/drivers/gl_common.c +++ b/gfx/drivers/gl_common.c @@ -64,6 +64,13 @@ void gl_load_texture_data(GLuint id, glBindTexture(GL_TEXTURE_2D, id); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, wrap); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, wrap); + +#ifdef IOS + if (filter_type == TEXTURE_FILTER_MIPMAP_LINEAR) + filter_type = TEXTURE_FILTER_LINEAR; + if (filter_type == TEXTURE_FILTER_MIPMAP_NEAREST) + filter_type = TEXTURE_FILTER_NEAREST; +#endif switch (filter_type) { diff --git a/gfx/drivers_shader/shader_glsl.c b/gfx/drivers_shader/shader_glsl.c index adc0dfe911..f05ff44cf7 100644 --- a/gfx/drivers_shader/shader_glsl.c +++ b/gfx/drivers_shader/shader_glsl.c @@ -158,6 +158,9 @@ static const char *stock_fragment_legacy = "}"; static const char *stock_vertex_modern_blend = + "#ifdef GL_ES\n" + "precision mediump float;\n" + "#endif\n" "attribute vec2 TexCoord;\n" "attribute vec2 VertexCoord;\n" "attribute vec4 Color;\n" diff --git a/libretro-common/net/net_http.c b/libretro-common/net/net_http.c index bcfb6a35b2..e34185954d 100644 --- a/libretro-common/net/net_http.c +++ b/libretro-common/net/net_http.c @@ -74,6 +74,10 @@ static int net_http_new_socket(const char *domain, int port) #endif struct addrinfo hints, *addr = NULL; char portstr[16] = {0}; + + /* Initialize the network. */ + if (!network_init()) + return -1; snprintf(portstr, sizeof(portstr), "%i", port); diff --git a/menu/cbs/menu_cbs_left.c b/menu/cbs/menu_cbs_left.c index 56782304cf..5dbc82d44b 100644 --- a/menu/cbs/menu_cbs_left.c +++ b/menu/cbs/menu_cbs_left.c @@ -496,6 +496,7 @@ static int menu_cbs_init_bind_left_compare_type(menu_file_list_cbs_t *cbs, case MENU_VALUE_MAIN_MENU: case MENU_VALUE_HISTORY_TAB: case MENU_VALUE_ADD_TAB: + case MENU_VALUE_PLAYLISTS_TAB: BIND_ACTION_LEFT(cbs, action_left_mainmenu); break; default: @@ -525,6 +526,20 @@ int menu_cbs_init_bind_left(menu_file_list_cbs_t *cbs, BIND_ACTION_LEFT(cbs, bind_left_generic); + if (type == MENU_SETTING_NO_ITEM) + { + switch (menu_label_hash) + { + case MENU_VALUE_HORIZONTAL_MENU: + case MENU_VALUE_MAIN_MENU: + case 153956705: /* TODO/FIXME - dehardcode */ + BIND_ACTION_LEFT(cbs, action_left_mainmenu); + return 0; + default: + break; + } + } + if (menu_cbs_init_bind_left_compare_label(cbs, label, label_hash, menu_label_hash, elem0) == 0) return 0; diff --git a/menu/cbs/menu_cbs_right.c b/menu/cbs/menu_cbs_right.c index 3c112a6b19..5a4d1e445b 100644 --- a/menu/cbs/menu_cbs_right.c +++ b/menu/cbs/menu_cbs_right.c @@ -552,6 +552,20 @@ int menu_cbs_init_bind_right(menu_file_list_cbs_t *cbs, return -1; BIND_ACTION_RIGHT(cbs, bind_right_generic); + + if (type == MENU_SETTING_NO_ITEM) + { + switch (menu_label_hash) + { + case MENU_VALUE_HORIZONTAL_MENU: + case MENU_VALUE_MAIN_MENU: + case 153956705: /* TODO/FIXME - dehardcode */ + BIND_ACTION_RIGHT(cbs, action_right_mainmenu); + return 0; + default: + break; + } + } if (menu_cbs_init_bind_right_compare_label(cbs, label, label_hash, menu_label_hash, elem0) == 0) return 0; diff --git a/menu/drivers/glui.c b/menu/drivers/glui.c index fefc912a13..fb27d4f08b 100644 --- a/menu/drivers/glui.c +++ b/menu/drivers/glui.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -43,9 +44,24 @@ enum GLUI_TEXTURE_BACK, GLUI_TEXTURE_SWITCH_ON, GLUI_TEXTURE_SWITCH_OFF, + GLUI_TEXTURE_TAB_MAIN_ACTIVE, + GLUI_TEXTURE_TAB_PLAYLISTS_ACTIVE, + GLUI_TEXTURE_TAB_SETTINGS_ACTIVE, + GLUI_TEXTURE_TAB_MAIN_PASSIVE, + GLUI_TEXTURE_TAB_PLAYLISTS_PASSIVE, + GLUI_TEXTURE_TAB_SETTINGS_PASSIVE, GLUI_TEXTURE_LAST }; +enum +{ + GLUI_SYSTEM_TAB_MAIN = 0, + GLUI_SYSTEM_TAB_PLAYLISTS, + GLUI_SYSTEM_TAB_SETTINGS +}; + +#define GLUI_SYSTEM_TAB_END GLUI_SYSTEM_TAB_SETTINGS + struct glui_texture_item { GRuint id; @@ -53,6 +69,7 @@ struct glui_texture_item typedef struct glui_handle { + unsigned tabs_height; unsigned line_height; unsigned icon_size; unsigned margin; @@ -71,6 +88,19 @@ typedef struct glui_handle GRuint white; } textures; + struct + { + struct + { + unsigned idx; + unsigned idx_old; + } active; + + float x_pos; + size_t selection_ptr_old; + size_t selection_ptr; + } categories; + gfx_font_raster_block_t list_block; } glui_handle_t; @@ -111,6 +141,24 @@ static void glui_context_reset_textures(glui_handle_t *glui, const char *iconpat case GLUI_TEXTURE_SWITCH_OFF: fill_pathname_join(path, iconpath, "off.png", sizeof(path)); break; + case GLUI_TEXTURE_TAB_MAIN_ACTIVE: + fill_pathname_join(path, iconpath, "main_tab_active.png", sizeof(path)); + break; + case GLUI_TEXTURE_TAB_PLAYLISTS_ACTIVE: + fill_pathname_join(path, iconpath, "playlists_tab_active.png", sizeof(path)); + break; + case GLUI_TEXTURE_TAB_SETTINGS_ACTIVE: + fill_pathname_join(path, iconpath, "settings_tab_active.png", sizeof(path)); + break; + case GLUI_TEXTURE_TAB_MAIN_PASSIVE: + fill_pathname_join(path, iconpath, "main_tab_passive.png", sizeof(path)); + break; + case GLUI_TEXTURE_TAB_PLAYLISTS_PASSIVE: + fill_pathname_join(path, iconpath, "playlists_tab_passive.png", sizeof(path)); + break; + case GLUI_TEXTURE_TAB_SETTINGS_PASSIVE: + fill_pathname_join(path, iconpath, "settings_tab_passive.png", sizeof(path)); + break; } if (path[0] == '\0' || !path_file_exists(path)) @@ -233,7 +281,7 @@ static void glui_draw_scrollbar(gl_t *gl, unsigned width, unsigned height, GRflo glui = (glui_handle_t*)menu->userdata; content_height = menu_entries_get_end() * glui->line_height; - total_height = height - header_height; + total_height = height - header_height - glui->tabs_height; scrollbar_height = total_height / (content_height / total_height) - (header_height / 6); y = total_height * menu->scroll_y / content_height; @@ -370,12 +418,12 @@ static void glui_render(void) menu->scroll_y = 0; bottom = menu_entries_get_end() * glui->line_height - - height + header_height; + - height + header_height + glui->tabs_height; if (menu->scroll_y > bottom) menu->scroll_y = bottom; if (menu_entries_get_end() * glui->line_height - < height - header_height) + < height - header_height - glui->tabs_height) menu->scroll_y = 0; if (menu_entries_get_end() < height / glui->line_height) @@ -551,6 +599,20 @@ static void glui_draw_cursor(gl_t *gl, glui_handle_t *glui, MENU_DISPLAY_PRIM_TRIANGLESTRIP); } +static size_t glui_list_get_size(void *data, menu_list_type_t type) +{ + size_t list_size = 0; + + /*switch (type) + { + case MENU_LIST_PLAIN:*/ + list_size = menu_entries_get_stack_size(0); + /*break; + }*/ + + return list_size; +} + static void glui_frame(void) { unsigned header_height; @@ -603,7 +665,7 @@ static void glui_frame(void) 0, 0, 0, 0.2, 0, 0, 0, 0.2, }; - unsigned width, height, ticker_limit; + unsigned width, height, ticker_limit, i, tab_width; char msg[PATH_MAX_LENGTH]; char title[PATH_MAX_LENGTH]; char title_buf[PATH_MAX_LENGTH]; @@ -619,6 +681,11 @@ static void glui_frame(void) const uint32_t normal_color = 0x212121ff; const uint32_t hover_color = 0x212121ff; const uint32_t title_color = 0xffffffff; + const uint32_t activetab_color = 0x0096f2ff; + const uint32_t passivetab_color = 0x9e9e9eff; + + (void)passivetab_color; + (void)activetab_color; if (!menu || !menu->userdata) return; @@ -674,7 +741,68 @@ static void glui_frame(void) width, height, &blue_bg[0]); - /* shadow underneath header */ + /* display tabs if depth equal one, if not hide them */ + if (glui_list_get_size(menu, MENU_LIST_PLAIN) == 1) + { + float scale_factor; + menu_display_ctl(MENU_DISPLAY_CTL_GET_DPI, &scale_factor); + + glui->tabs_height = scale_factor / 3; + + /* tabs background */ + glui_render_quad(gl, 0, height - glui->tabs_height, width, + glui->tabs_height, + width, height, + &white_bg[0]); + + /* tabs separator */ + glui_render_quad(gl, 0, height - glui->tabs_height, width, + 1, + width, height, + &grey_bg[0]); + + for (i = 0; i <= GLUI_SYSTEM_TAB_END; i++) + { + unsigned tab_icon = GLUI_TEXTURE_TAB_MAIN_PASSIVE; + switch (i) + { + case GLUI_SYSTEM_TAB_MAIN: + tab_icon = (i == glui->categories.selection_ptr) + ? GLUI_TEXTURE_TAB_MAIN_ACTIVE + : GLUI_TEXTURE_TAB_MAIN_PASSIVE; + break; + case GLUI_SYSTEM_TAB_PLAYLISTS: + tab_icon = (i == glui->categories.selection_ptr) + ? GLUI_TEXTURE_TAB_PLAYLISTS_ACTIVE + : GLUI_TEXTURE_TAB_PLAYLISTS_PASSIVE; + break; + case GLUI_SYSTEM_TAB_SETTINGS: + tab_icon = (i == glui->categories.selection_ptr) + ? GLUI_TEXTURE_TAB_SETTINGS_ACTIVE + : GLUI_TEXTURE_TAB_SETTINGS_PASSIVE; + break; + } + + glui_draw_icon(gl, glui, glui->textures.list[tab_icon].id, + width / (GLUI_SYSTEM_TAB_END+1) * (i+0.5) - glui->icon_size/2, + height - glui->tabs_height, + width, height, 0, 1, &pure_white[0]); + } + + /* active tab marker */ + tab_width = width / (GLUI_SYSTEM_TAB_END+1); + glui_render_quad(gl, glui->categories.selection_ptr * tab_width, + height - (header_height/16), + tab_width, + header_height/16, + width, height, + &blue_bg[0]); + } + else + { + glui->tabs_height = 0; + } + glui_render_quad(gl, 0, header_height, width, header_height/12, width, height, @@ -686,7 +814,7 @@ static void glui_frame(void) { title_margin = glui->icon_size; glui_draw_icon(gl, glui, glui->textures.list[GLUI_TEXTURE_BACK].id, - 0, 0, width, height, 0, 1, &white_bg[0]); + 0, 0, width, height, 0, 1, &pure_white[0]); } ticker_limit = (width - glui->margin*2) / glui->glyph_width; @@ -780,6 +908,7 @@ static void glui_layout(menu_handle_t *menu, glui_handle_t *glui) new_header_height = scale_factor / 3; new_font_size = scale_factor / 9; + glui->tabs_height = scale_factor / 3; glui->line_height = scale_factor / 3; glui->margin = scale_factor / 9; glui->icon_size = scale_factor / 3; @@ -873,16 +1002,21 @@ static void glui_context_bg_destroy(glui_handle_t *glui) static void glui_context_destroy(void) { - gl_t *gl = (gl_t*)video_driver_get_ptr(NULL); + unsigned i; glui_handle_t *glui = NULL; menu_handle_t *menu = menu_driver_get_ptr(); - driver_t *driver = driver_get_ptr(); - if (!menu || !menu->userdata || !gl || !driver) + if (!menu || !menu->userdata) return; glui = (glui_handle_t*)menu->userdata; + if (!glui) + return; + + for (i = 0; i < GLUI_TEXTURE_LAST; i++) + video_texture_unload((uintptr_t*)&glui->textures.list[i].id); + menu_display_free_main_font(); glui_context_bg_destroy(glui); @@ -1027,6 +1161,141 @@ static int glui_environ(menu_environ_cb_t type, void *data) return -1; } +static void glui_list_cache(menu_list_type_t type, unsigned action) +{ + size_t stack_size, list_size; + glui_handle_t *glui = NULL; + menu_handle_t *menu = menu_driver_get_ptr(); + file_list_t *menu_stack = menu_entries_get_menu_stack_ptr(0); + + if (!menu) + return; + + glui = (glui_handle_t*)menu->userdata; + + if (!glui) + return; + + list_size = GLUI_SYSTEM_TAB_END; + + switch (type) + { + case MENU_LIST_PLAIN: + break; + case MENU_LIST_HORIZONTAL: + glui->categories.selection_ptr_old = glui->categories.selection_ptr; + + switch (action) + { + case MENU_ACTION_LEFT: + if (glui->categories.selection_ptr == 0) + { + glui->categories.selection_ptr = list_size; + glui->categories.active.idx = list_size - 1; + } + else + glui->categories.selection_ptr--; + break; + default: + if (glui->categories.selection_ptr == list_size) + { + glui->categories.selection_ptr = 0; + glui->categories.active.idx = 1; + } + else + glui->categories.selection_ptr++; + break; + } + + stack_size = menu_stack->size; + + if (menu_stack->list[stack_size - 1].label) + free(menu_stack->list[stack_size - 1].label); + menu_stack->list[stack_size - 1].label = NULL; + + switch (glui->categories.selection_ptr) + { + case GLUI_SYSTEM_TAB_MAIN: + menu_stack->list[stack_size - 1].label = + strdup(menu_hash_to_str(MENU_VALUE_MAIN_MENU)); + menu_stack->list[stack_size - 1].type = + MENU_SETTINGS; + break; + case GLUI_SYSTEM_TAB_PLAYLISTS: + menu_stack->list[stack_size - 1].label = + strdup(menu_hash_to_str(MENU_VALUE_PLAYLISTS_TAB)); + menu_stack->list[stack_size - 1].label = + strdup(menu_hash_to_str(MENU_VALUE_PLAYLISTS_TAB)); + menu_stack->list[stack_size - 1].type = + MENU_PLAYLISTS_TAB; + break; + case GLUI_SYSTEM_TAB_SETTINGS: + menu_stack->list[stack_size - 1].label = + strdup(menu_hash_to_str(MENU_VALUE_SETTINGS_TAB)); + menu_stack->list[stack_size - 1].type = + MENU_SETTINGS; + break; + } + break; + } +} + +static int glui_list_push(menu_displaylist_info_t *info, unsigned type) +{ + int ret = -1; + menu_handle_t *menu = menu_driver_get_ptr(); + global_t *global = global_get_ptr(); + + switch (type) + { + case DISPLAYLIST_MAIN_MENU: + menu_entries_clear(info->list); + + if (global->inited.main && (global->inited.core.type != CORE_TYPE_DUMMY)) + menu_displaylist_parse_settings(menu, info, + menu_hash_to_str(MENU_LABEL_CONTENT_SETTINGS), PARSE_ACTION, false); + +#if defined(HAVE_DYNAMIC) || defined(HAVE_LIBRETRO_MANAGEMENT) + menu_displaylist_parse_settings(menu, info, + menu_hash_to_str(MENU_LABEL_CORE_LIST), PARSE_ACTION, false); +#endif + menu_displaylist_parse_settings(menu, info, + menu_hash_to_str(MENU_LABEL_LOAD_CONTENT_LIST), PARSE_ACTION, false); + menu_displaylist_parse_settings(menu, info, + menu_hash_to_str(MENU_LABEL_LOAD_CONTENT_HISTORY), PARSE_ACTION, false); +#if defined(HAVE_NETWORKING) +#if defined(HAVE_LIBRETRODB) + menu_displaylist_parse_settings(menu, info, + menu_hash_to_str(MENU_LABEL_ADD_CONTENT_LIST), PARSE_ACTION, false); +#endif + menu_displaylist_parse_settings(menu, info, + menu_hash_to_str(MENU_LABEL_ONLINE_UPDATER), PARSE_ACTION, false); +#endif + menu_displaylist_parse_settings(menu, info, + menu_hash_to_str(MENU_LABEL_INFORMATION_LIST), PARSE_ACTION, false); +#ifndef HAVE_DYNAMIC + menu_displaylist_parse_settings(menu, info, + menu_hash_to_str(MENU_LABEL_RESTART_RETROARCH), PARSE_ACTION, false); +#endif + menu_displaylist_parse_settings(menu, info, + menu_hash_to_str(MENU_LABEL_CONFIGURATIONS), PARSE_ACTION, false); + menu_displaylist_parse_settings(menu, info, + menu_hash_to_str(MENU_LABEL_SAVE_NEW_CONFIG), PARSE_ACTION, false); + menu_displaylist_parse_settings(menu, info, + menu_hash_to_str(MENU_LABEL_HELP_LIST), PARSE_ACTION, false); +#if !defined(IOS) + menu_displaylist_parse_settings(menu, info, + menu_hash_to_str(MENU_LABEL_QUIT_RETROARCH), PARSE_ACTION, false); +#endif + menu_displaylist_parse_settings(menu, info, + menu_hash_to_str(MENU_LABEL_SHUTDOWN), PARSE_ACTION, false); + info->need_push = true; + ret = 0; + break; + } + return ret; +} + menu_ctx_driver_t menu_ctx_glui = { NULL, glui_get_message, @@ -1050,10 +1319,10 @@ menu_ctx_driver_t menu_ctx_glui = { NULL, NULL, NULL, + glui_list_cache, + glui_list_push, NULL, - NULL, - NULL, - NULL, + glui_list_get_size, NULL, glui_list_set_selection, NULL, diff --git a/menu/intl/menu_hash_us.c b/menu/intl/menu_hash_us.c index fa7d6e6c3f..c8ca204e3e 100644 --- a/menu/intl/menu_hash_us.c +++ b/menu/intl/menu_hash_us.c @@ -780,6 +780,8 @@ const char *menu_hash_to_str_us(uint32_t hash) return "History tab"; case MENU_VALUE_ADD_TAB: return "Add tab"; + case MENU_VALUE_PLAYLISTS_TAB: + return "Playlists tab"; case MENU_LABEL_VALUE_NO_SETTINGS_FOUND: return "No settings found."; case MENU_LABEL_VALUE_NO_PERFORMANCE_COUNTERS: diff --git a/menu/menu.h b/menu/menu.h index 27dd77c56a..8d4def3215 100644 --- a/menu/menu.h +++ b/menu/menu.h @@ -104,6 +104,8 @@ typedef enum MENU_SETTINGS_TAB, MENU_HISTORY_TAB, MENU_ADD_TAB, + MENU_PLAYLISTS_TAB, + MENU_SETTING_NO_ITEM, MENU_SETTING_DRIVER, MENU_SETTING_ACTION, MENU_SETTING_ACTION_RUN, diff --git a/menu/menu_display.c b/menu/menu_display.c index e88dac2154..ad409159e7 100644 --- a/menu/menu_display.c +++ b/menu/menu_display.c @@ -514,6 +514,10 @@ void menu_display_draw_frame( const shader_backend_t *shader = (const shader_backend_t*)shader_data; driver_t *driver = driver_get_ptr(); + /* TODO - edge case */ + if (height <= 0) + height = 1; + glViewport(x, y, width, height); glBindTexture(GL_TEXTURE_2D, texture); diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index b00f22c98b..6c7f4a18fc 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -1706,7 +1706,7 @@ static int menu_displaylist_parse_load_content_settings(menu_displaylist_info_t else menu_entries_push(info->list, menu_hash_to_str(MENU_LABEL_VALUE_NO_ITEMS), - "", 0, 0, 0); + "", MENU_SETTING_NO_ITEM, 0, 0); return 0; } @@ -1929,7 +1929,7 @@ static int menu_displaylist_parse_options(menu_displaylist_info_t *info) #else menu_entries_push(info->list, menu_hash_to_str(MENU_LABEL_VALUE_NO_ITEMS), - "", 0, 0, 0); + "", MENU_SETTING_NO_ITEM, 0, 0); #endif return 0; @@ -2125,7 +2125,7 @@ static int menu_displaylist_parse_generic(menu_displaylist_info_t *info, bool ho { menu_entries_push(info->list, menu_hash_to_str(MENU_LABEL_VALUE_NO_ITEMS), - "", 0, 0, 0); + "", MENU_SETTING_NO_ITEM, 0, 0); } string_list_free(str_list); @@ -2402,7 +2402,7 @@ int menu_displaylist_push_list(menu_displaylist_info_t *info, unsigned type) #else menu_entries_push(info->list, menu_hash_to_str(MENU_LABEL_VALUE_NO_ITEMS), - "", 0, 0, 0); + "", MENU_SETTING_NO_ITEM, 0, 0); ret = 0; #endif info->need_refresh = true; @@ -3027,6 +3027,7 @@ int menu_displaylist_push_list(menu_displaylist_info_t *info, unsigned type) case DISPLAYLIST_DATABASE_PLAYLISTS_HORIZONTAL: { bool horizontal = (type == DISPLAYLIST_DATABASE_PLAYLISTS_HORIZONTAL); + if (menu_displaylist_parse_generic(info, horizontal) == 0) { info->need_refresh = true; @@ -3074,6 +3075,7 @@ int menu_displaylist_push(file_list_t *list, file_list_t *menu_list) uint32_t hash_label = 0; unsigned type = 0; menu_displaylist_info_t info = {0}; + settings_t *settings = config_get_ptr(); menu_entries_get_last_stack(&path, &label, &type, NULL); @@ -3110,6 +3112,31 @@ int menu_displaylist_push(file_list_t *list, file_list_t *menu_list) return -1; menu_displaylist_push_list_process(&info); return 0; + case MENU_VALUE_PLAYLISTS_TAB: + info.type = 42; + strlcpy(info.exts, "lpl", sizeof(info.exts)); + strlcpy(info.label, menu_hash_to_str(MENU_LABEL_CONTENT_COLLECTION_LIST), + sizeof(info.label)); + + if (settings->playlist_directory[0] != '\0') + { + strlcpy(info.path, settings->playlist_directory, + sizeof(info.path)); + if (menu_displaylist_push_list(&info, DISPLAYLIST_DATABASE_PLAYLISTS_HORIZONTAL) != 0) + return -1; + } + else + { + menu_entries_clear(info.list); + menu_entries_push(info.list, + menu_hash_to_str(MENU_LABEL_VALUE_NO_PLAYLIST_ENTRIES_AVAILABLE), + menu_hash_to_str(MENU_LABEL_NO_PLAYLIST_ENTRIES_AVAILABLE), + MENU_INFO_MESSAGE, 0, 0); + info.need_refresh = true; + info.need_push = true; + } + menu_displaylist_push_list_process(&info); + return 0; case MENU_VALUE_HORIZONTAL_MENU: if (menu_displaylist_push_list(&info, DISPLAYLIST_HORIZONTAL) != 0) return -1; diff --git a/menu/menu_hash.h b/menu/menu_hash.h index d6fcfd29fb..994de737af 100644 --- a/menu/menu_hash.h +++ b/menu/menu_hash.h @@ -572,6 +572,7 @@ extern "C" { #define MENU_VALUE_SETTINGS_TAB 0x6548d16dU #define MENU_VALUE_HISTORY_TAB 0xea9b0ceeU #define MENU_VALUE_ADD_TAB 0x7fb20225U +#define MENU_VALUE_PLAYLISTS_TAB 0x092d3161U #define MENU_VALUE_MAIN_MENU 0x1625971fU #define MENU_LABEL_VALUE_SETTINGS 0x8aca3ff6U #define MENU_VALUE_INPUT_SETTINGS 0xddd30846U diff --git a/menu/menu_setting.c b/menu/menu_setting.c index 1f6f6a0b88..4112b3f15e 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -482,7 +482,6 @@ rarch_setting_t *menu_setting_find(const char *label) int menu_setting_set_flags(rarch_setting_t *setting) { - uint64_t flags = menu_setting_get_flags(setting); if (!setting) return 0; diff --git a/pkg/android/phoenix/jni/Android2.mk b/pkg/android/phoenix/jni/Android2.mk new file mode 100644 index 0000000000..5b69a4fbbf --- /dev/null +++ b/pkg/android/phoenix/jni/Android2.mk @@ -0,0 +1,85 @@ +LOCAL_PATH := $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_MODULE := retroarch-jni +RARCH_DIR := ../../../.. +LOCAL_CFLAGS += -std=gnu99 -Wall -DRARCH_DUMMY_LOG -DHAVE_ZLIB -DHAVE_MMAP -DRARCH_INTERNAL +LOCAL_LDLIBS := -llog -lz +LOCAL_SRC_FILES := apk-extract/apk-extract.c \ + $(RARCH_DIR)/libretro-common/file/file_extract.c \ + $(RARCH_DIR)/libretro-common/file/file_path.c \ + $(RARCH_DIR)/file_ops.c \ + $(RARCH_DIR)/libretro-common/string/string_list.c \ + $(RARCH_DIR)/libretro-common/compat/compat_strl.c \ + $(RARCH_DIR)/libretro-common/file/retro_file.c \ + $(RARCH_DIR)/libretro-common/file/retro_stat.c + +LOCAL_C_INCLUDES := $(LOCAL_PATH)/$(RARCH_DIR)/libretro-common/include/ + +include $(BUILD_SHARED_LIBRARY) + +HAVE_NEON := 1 +HAVE_LOGGER := 0 + +include $(CLEAR_VARS) +ifeq ($(TARGET_ARCH),arm) + LOCAL_CFLAGS += -DANDROID_ARM -marm + LOCAL_ARM_MODE := arm +endif + +ifeq ($(TARGET_ARCH),x86) + LOCAL_CFLAGS += -DANDROID_X86 -DHAVE_SSSE3 +endif + +ifeq ($(TARGET_ARCH_ABI),armeabi-v7a) + +ifeq ($(HAVE_NEON),1) + LOCAL_CFLAGS += -D__ARM_NEON__ + LOCAL_SRC_FILES += $(RARCH_DIR)/audio/audio_utils_neon.S.neon + LOCAL_SRC_FILES += $(RARCH_DIR)/audio/drivers_resampler/sinc_neon.S.neon + LOCAL_SRC_FILES += $(RARCH_DIR)/audio/drivers_resampler/cc_resampler_neon.S.neon +endif +LOCAL_CFLAGS += -DSINC_LOWER_QUALITY + +LOCAL_CFLAGS += -DANDROID_ARM_V7 +endif + +ifeq ($(TARGET_ARCH),mips) + LOCAL_CFLAGS += -DANDROID_MIPS -D__mips__ -D__MIPSEL__ +endif + +LOCAL_MODULE := retroarch-activity + +LOCAL_SRC_FILES += $(RARCH_DIR)/griffin/griffin.c + +ifeq ($(HAVE_LOGGER), 1) + LOCAL_CFLAGS += -DHAVE_LOGGER +endif +LOGGER_LDLIBS := -llog + +ifeq ($(GLES),3) + GLES_LIB := -lGLESv3 + LOCAL_CFLAGS += -DHAVE_OPENGLES3 +else + GLES_LIB := -lGLESv2 +endif + + +LOCAL_CFLAGS += -Wall -pthread -Wno-unused-function -fno-stack-protector -funroll-loops -DRARCH_MOBILE -DHAVE_GRIFFIN -DANDROID -DHAVE_DYNAMIC -DHAVE_OPENGL -DHAVE_FBO -DHAVE_OVERLAY -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DGLSL_DEBUG -DHAVE_DYLIB -DHAVE_GLSL -DHAVE_MENU -DHAVE_RGUI -DHAVE_ZLIB -DHAVE_RPNG -DINLINE=inline -DHAVE_THREADS -D__LIBRETRO__ -DHAVE_RSOUND -DHAVE_NETPLAY -DHAVE_NETWORKING -DRARCH_INTERNAL -DHAVE_FILTERS_BUILTIN -DHAVE_GLUI -DHAVE_XMB -std=gnu99 -DHAVE_LIBRETRODB -DHAVE_STB_FONT +LOCAL_CFLAGS += -DHAVE_7ZIP +LOCAL_CFLAGS += -DDEBUG_ANDROID + +ifeq ($(NDK_DEBUG),1) +LOCAL_CFLAGS += -O0 -g +else +LOCAL_CFLAGS += -O2 -DNDEBUG +endif + +LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -landroid -lEGL $(GLES_LIB) $(LOGGER_LDLIBS) -ldl +LOCAL_C_INCLUDES := $(LOCAL_PATH)/$(RARCH_DIR)/libretro-common/include/ + +LOCAL_CFLAGS += -DHAVE_SL +LOCAL_LDLIBS += -lOpenSLES -lz + +include $(BUILD_SHARED_LIBRARY) +