Reuse g_extern.title_buf (already preset) in console menus

This commit is contained in:
twinaphex 2013-01-08 23:36:04 +01:00
parent 05ec28aef5
commit 410e32b64a
3 changed files with 1 additions and 16 deletions

View File

@ -953,10 +953,6 @@ HRESULT CRetroArchCoreBrowser::OnNotifyPress( HXUIOBJ hObjPressed, BOOL& bHandle
HRESULT CRetroArchMain::OnInit(XUIMessageInit * pInitData, BOOL& bHandled)
{
struct retro_system_info info;
retro_get_system_info(&info);
const char *id = info.library_name ? info.library_name : "Unknown";
GetChildById(L"XuiLogo", &m_logoimage);
GetChildById(L"XuiBtnRomBrowser", &m_filebrowser);
GetChildById(L"XuiBtnSettings", &m_settings);
@ -967,8 +963,6 @@ HRESULT CRetroArchMain::OnInit(XUIMessageInit * pInitData, BOOL& bHandled)
GetChildById(L"XuiTxtCoreText", &m_core);
GetChildById(L"XuiBtnLibretroCore", &m_change_libretro_core);
snprintf(g_extern.title_buf, sizeof(g_extern.title_buf), "%s %s", id, info.library_version);
convert_char_to_wchar(strw_buffer, g_extern.title_buf, sizeof(strw_buffer));
m_core.SetText(strw_buffer);
rarch_settings_create_menu_item_label_w(strw_buffer, S_LBL_RARCH_VERSION, sizeof(strw_buffer));

View File

@ -387,10 +387,7 @@ static void render_text(rgui_handle_t *rgui)
blit_line(rgui, TERM_START_X + 15, 15, title, true);
struct retro_system_info info;
retro_get_system_info(&info);
snprintf(title, sizeof(title), "CORE: %s %s", info.library_name, info.library_version);
blit_line(rgui, TERM_START_X + 15, (TERM_HEIGHT * FONT_HEIGHT_STRIDE) + TERM_START_Y + 2, title, true);
blit_line(rgui, TERM_START_X + 15, (TERM_HEIGHT * FONT_HEIGHT_STRIDE) + TERM_START_Y + 2, g_extern.title_buf, true);
unsigned x = TERM_START_X;
unsigned y = TERM_START_Y;

View File

@ -2394,12 +2394,6 @@ void menu_init(void)
{
DEVICE_CAST device_ptr = (DEVICE_CAST)driver.video_data;
//Set libretro filename and version to variable
struct retro_system_info info;
retro_get_system_info(&info);
const char *id = info.library_name ? info.library_name : "Unknown";
snprintf(g_extern.title_buf, sizeof(g_extern.title_buf), "%s %s", id, info.library_version);
rmenu_state.init_resources = init_filebrowser;
rmenu_state.free_resources = free_filebrowser;
rmenu_state.input = 0;