From 809ae0ab06e9e8b56a0886a5976b56697a68e506 Mon Sep 17 00:00:00 2001 From: ToadKing Date: Wed, 6 Mar 2013 12:19:56 -0500 Subject: [PATCH 1/2] get messages working again on android --- frontend/menu/rgui.c | 6 ++---- gfx/gl.c | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/frontend/menu/rgui.c b/frontend/menu/rgui.c index be636e4447..5d0d0c66c8 100644 --- a/frontend/menu/rgui.c +++ b/frontend/menu/rgui.c @@ -569,8 +569,8 @@ static void render_text(rgui_handle_t *rgui) blit_line(rgui, x, y, message, i == rgui->directory_ptr); } - const char *message_queue; #ifdef GEKKO + const char *message_queue; gx_video_t *gx = (gx_video_t*)driver.video_data; if (rgui->msg_force) { @@ -581,10 +581,8 @@ static void render_text(rgui_handle_t *rgui) { message_queue = gx->msg; } -#else - message_queue = msg_queue_pull(g_extern.msg_queue); -#endif render_messagebox(rgui, message_queue); +#endif } #ifdef GEKKO diff --git a/gfx/gl.c b/gfx/gl.c index 92865af2cb..a62df1a0c4 100644 --- a/gfx/gl.c +++ b/gfx/gl.c @@ -1824,7 +1824,7 @@ static void *gl_init(const video_info_t *video, const input_driver_t **input, vo if (input && input_data) context_input_driver_func(input, input_data); -#ifndef HAVE_RMENU +#if !defined(HAVE_RMENU) || !defined(RARCH_CONSOLE) // Comes too early for console - moved to gl_start if (g_settings.video.font_enable) gl->font_ctx = gl_font_init_first(gl, g_settings.video.font_path, g_settings.video.font_size); From 9b6b17481295226b1219819fb710feb93e0106ee Mon Sep 17 00:00:00 2001 From: ToadKing Date: Wed, 6 Mar 2013 12:42:58 -0500 Subject: [PATCH 2/2] filebrowser setting to be used for CD switching, commented out for now --- frontend/menu/rgui.c | 11 ++++++++++- frontend/menu/rgui.h | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/frontend/menu/rgui.c b/frontend/menu/rgui.c index 5d0d0c66c8..c0344dfc0b 100644 --- a/frontend/menu/rgui.c +++ b/frontend/menu/rgui.c @@ -143,6 +143,7 @@ struct rgui_handle bool msg_force; char path_buf[PATH_MAX]; + char base_path[PATH_MAX]; const uint8_t *font; bool alloc_font; @@ -221,9 +222,9 @@ rgui_handle_t *rgui_init(const char *base_path, rgui->frame_buf = framebuf; rgui->frame_buf_pitch = framebuf_pitch; - rgui->folder_cb = folder_cb; rgui->userdata = userdata; + strlcpy(rgui->base_path, base_path, sizeof(rgui->base_path)); rgui->path_stack = rgui_list_new(); rgui->folder_buf = rgui_list_new(); @@ -501,6 +502,7 @@ static void render_text(rgui_handle_t *rgui) case RGUI_SETTINGS_DEBUG_TEXT: snprintf(type_str, sizeof(type_str), (g_extern.lifecycle_mode_state & (1ULL << MODE_FPS_DRAW)) ? "ON" : "OFF"); break; + case RGUI_SETTINGS_OPEN_FILEBROWSER: case RGUI_SETTINGS_CUSTOM_VIEWPORT: #ifdef HAVE_LIBRETRO_MANAGEMENT case RGUI_SETTINGS_CORE: @@ -975,6 +977,7 @@ static void rgui_settings_populate_entries(rgui_handle_t *rgui) RGUI_MENU_ITEM("Restart RetroArch", RGUI_SETTINGS_RESTART_EMULATOR); RGUI_MENU_ITEM("Exit RetroArch", RGUI_SETTINGS_QUIT_EMULATOR); #else + //RGUI_MENU_ITEM("Filebrowser", RGUI_SETTINGS_OPEN_FILEBROWSER); RGUI_MENU_ITEM("Save State", RGUI_SETTINGS_SAVESTATE_SAVE); RGUI_MENU_ITEM("Load State", RGUI_SETTINGS_SAVESTATE_LOAD); RGUI_MENU_ITEM("Take Screenshot", RGUI_SETTINGS_SCREENSHOT); @@ -1201,6 +1204,11 @@ static int rgui_settings_iterate(rgui_handle_t *rgui, rgui_action_t action) g_settings.video.aspect_ratio_idx = ASPECT_RATIO_CUSTOM; video_set_aspect_ratio_func(g_settings.video.aspect_ratio_idx); } + else if (type == RGUI_SETTINGS_OPEN_FILEBROWSER && action == RGUI_ACTION_OK) + { + rgui_list_push(rgui->path_stack, rgui->base_path, RGUI_FILE_DIRECTORY, rgui->directory_ptr); + rgui->need_refresh = true; + } else { int ret = rgui_settings_toggle_setting(type, action, menu_type); @@ -1408,6 +1416,7 @@ int rgui_iterate(rgui_handle_t *rgui, rgui_action_t action) rgui->folder_cb(dir, (rgui_file_enum_cb_t)rgui_list_push, &menu_type, rgui->folder_buf); +#ifdef if (*dir) rgui_list_sort(rgui->folder_buf); } diff --git a/frontend/menu/rgui.h b/frontend/menu/rgui.h index f187d41c2b..7e1ace5055 100644 --- a/frontend/menu/rgui.h +++ b/frontend/menu/rgui.h @@ -33,6 +33,7 @@ typedef enum RGUI_SETTINGS, // settings options are done here too + RGUI_SETTINGS_OPEN_FILEBROWSER, RGUI_SETTINGS_REWIND_ENABLE, RGUI_SETTINGS_REWIND_GRANULARITY, RGUI_SETTINGS_SAVESTATE_SAVE,