From 56a9d359ba605d4003545ebcfe80fe4ab47098c8 Mon Sep 17 00:00:00 2001 From: TwinAphex51224 Date: Tue, 22 May 2012 15:21:45 +0200 Subject: [PATCH] (360) OSD messages now also work if g_console.emulator_initialized is false --- 360/menu.cpp | 19 ++++++++++++++++++- 360/xdk360_video.cpp | 3 ++- console/console_ext.c | 15 +++++++++------ 3 files changed, 29 insertions(+), 8 deletions(-) diff --git a/360/menu.cpp b/360/menu.cpp index 8d48d34fd5..1195cf796d 100644 --- a/360/menu.cpp +++ b/360/menu.cpp @@ -244,7 +244,7 @@ HRESULT CRetroArchQuickMenu::OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled case MENU_ITEM_RESIZE_MODE: g_console.input_loop = INPUT_LOOP_RESIZE_MODE; msg_queue_clear(g_extern.msg_queue); - msg_queue_push(g_extern.msg_queue, "INFO - Resize the screen by moving around the two analog sticks.\nPress Y to reset to default values, and B to go back.\nTo select the resized screen mode, set Aspect Ratio to: 'Custom'.", 1, 180); + msg_queue_push(g_extern.msg_queue, "INFO - Resize the screen by moving around the two analog sticks.\nPress Y to reset to default values, and B to go back.\nTo select the resized screen mode, set Aspect Ratio to: 'Custom'.", 1, 270); break; case MENU_ITEM_FRAME_ADVANCE: if (g_console.emulator_initialized) @@ -666,6 +666,23 @@ void menu_loop(void) SET_TIMER_EXPIRATION(30); } + /* XBox 360 specific font code */ + { + const char *msg = msg_queue_pull(g_extern.msg_queue); + + if (msg) + { + if(IS_TIMER_EXPIRED() || g_first_msg) + { + xdk360_console_format(msg); + g_first_msg = 0; + SET_TIMER_EXPIRATION(30); + } + + xdk360_console_draw(); + } + } + video_xdk360.swap(NULL); }while(g_console.menu_enable); diff --git a/360/xdk360_video.cpp b/360/xdk360_video.cpp index 7d26450fe4..35556a162e 100644 --- a/360/xdk360_video.cpp +++ b/360/xdk360_video.cpp @@ -515,6 +515,7 @@ static bool xdk360_gfx_frame(void *data, const void *frame, { xdk360_video_t *vid = (xdk360_video_t*)data; D3DSurface* pRenderTarget0; + bool menu_enabled = g_console.menu_enable; if (vid->last_width != width || vid->last_height != height) { @@ -626,7 +627,7 @@ static bool xdk360_gfx_frame(void *data, const void *frame, } /* XBox 360 specific font code */ - if (msg) + if (msg && !menu_enabled) { if(IS_TIMER_EXPIRED() || g_first_msg) { diff --git a/console/console_ext.c b/console/console_ext.c index c6c103ce09..c14ec51f6b 100644 --- a/console/console_ext.c +++ b/console/console_ext.c @@ -97,7 +97,7 @@ static int rarch_extract_currentfile_in_zip(unzFile uf) if (err != UNZ_OK) { - RARCH_ERR("Error %d with zipfile in unzGetCurrentFileInfo.\n", err); + RARCH_ERR("Error %d with ZIP file in unzGetCurrentFileInfo.\n", err); return err; } @@ -119,7 +119,7 @@ static int rarch_extract_currentfile_in_zip(unzFile uf) err = unzOpenCurrentFile(uf); if (err != UNZ_OK) - RARCH_ERR("Error %d with zipfile in unzOpenCurrentFile.\n", err); + RARCH_ERR("Error %d with ZIP file in unzOpenCurrentFile.\n", err); else { /* success */ @@ -138,7 +138,7 @@ static int rarch_extract_currentfile_in_zip(unzFile uf) err = unzReadCurrentFile(uf, buf, size_buf); if (err < 0) { - RARCH_ERR("error %d with zipfile in unzReadCurrentFile.\n", err); + RARCH_ERR("error %d with ZIP file in unzReadCurrentFile.\n", err); break; } @@ -161,7 +161,7 @@ static int rarch_extract_currentfile_in_zip(unzFile uf) { err = unzCloseCurrentFile (uf); if (err != UNZ_OK) - RARCH_ERR("Error %d with zipfile in unzCloseCurrentFile.\n", err); + RARCH_ERR("Error %d with ZIP file in unzCloseCurrentFile.\n", err); } else unzCloseCurrentFile(uf); @@ -177,7 +177,7 @@ int rarch_extract_zipfile(const char *zip_path) unz_global_info gi; int err = unzGetGlobalInfo(uf, &gi); if (err != UNZ_OK) - RARCH_ERR("error %d with zipfile in unzGetGlobalInfo \n",err); + RARCH_ERR("error %d with ZIP file in unzGetGlobalInfo \n",err); for (unsigned i = 0; i < gi.number_entry; i++) { @@ -189,12 +189,15 @@ int rarch_extract_zipfile(const char *zip_path) err = unzGoToNextFile(uf); if (err != UNZ_OK) { - RARCH_ERR("error %d with zipfile in unzGoToNextFile\n",err); + RARCH_ERR("error %d with ZIP file in unzGoToNextFile\n",err); break; } } } + msg_queue_clear(g_extern.msg_queue); + msg_queue_push(g_extern.msg_queue, "INFO - ZIP file extracted to cache partition.", 1, 180); + return 0; }