Esempio n. 1
0
static void rmenu_xui_render(void)
{
   size_t begin, end;
   char title[256];
   const char *dir = NULL;
   unsigned menu_type = 0;
   unsigned menu_type_is = 0;

   if (!driver.menu || driver.menu->need_refresh && 
         (g_extern.lifecycle_state & (1ULL << MODE_MENU))
         && !driver.menu->msg_force)
      return;

   begin = driver.menu->selection_ptr;
   end   = file_list_get_size(driver.menu->selection_buf);

   rmenu_xui_render_background();

   file_list_get_last(driver.menu->menu_stack, &dir, &menu_type);

   if (driver.menu_ctx && driver.menu_ctx->backend && driver.menu_ctx->backend->type_is)
      menu_type_is = driver.menu_ctx->backend->type_is(menu_type);

   if (menu_type == MENU_SETTINGS_CORE)
      snprintf(title, sizeof(title), "CORE SELECTION %s", dir);
   else if (menu_type == MENU_SETTINGS_DEFERRED_CORE)
      snprintf(title, sizeof(title), "DETECTED CORES %s", dir);
   else if (menu_type == MENU_SETTINGS_CONFIG)
      snprintf(title, sizeof(title), "CONFIG %s", dir);
   else if (menu_type == MENU_SETTINGS_DISK_APPEND)
      snprintf(title, sizeof(title), "DISK APPEND %s", dir);
   else if (menu_type == MENU_SETTINGS_VIDEO_OPTIONS)
      strlcpy(title, "VIDEO OPTIONS", sizeof(title));
   else if (menu_type == MENU_SETTINGS_INPUT_OPTIONS)
      strlcpy(title, "INPUT OPTIONS", sizeof(title));
   else if (menu_type == MENU_SETTINGS_OVERLAY_OPTIONS)
      strlcpy(title, "OVERLAY OPTIONS", sizeof(title));
   else if (menu_type == MENU_SETTINGS_NETPLAY_OPTIONS)
      strlcpy(title, "NETPLAY OPTIONS", sizeof(title));
   else if (menu_type == MENU_SETTINGS_PATH_OPTIONS)
      strlcpy(title, "PATH OPTIONS", sizeof(title));
   else if (menu_type == MENU_SETTINGS_OPTIONS)
      strlcpy(title, "SETTINGS", sizeof(title));
   else if (menu_type == MENU_SETTINGS_DRIVERS)
      strlcpy(title, "DRIVER OPTIONS", sizeof(title));
   else if (menu_type == MENU_SETTINGS_PERFORMANCE_COUNTERS)
      strlcpy(title, "PERFORMANCE COUNTERS", sizeof(title));
   else if (menu_type == MENU_SETTINGS_PERFORMANCE_COUNTERS_LIBRETRO)
      strlcpy(title, "CORE PERFORMANCE COUNTERS", sizeof(title));
   else if (menu_type == MENU_SETTINGS_PERFORMANCE_COUNTERS_FRONTEND)
      strlcpy(title, "FRONTEND PERFORMANCE COUNTERS", sizeof(title));
#ifdef HAVE_SHADER_MANAGER
   else if (menu_type == MENU_SETTINGS_SHADER_OPTIONS)
      strlcpy(title, "SHADER OPTIONS", sizeof(title));
#endif
   else if (menu_type == MENU_SETTINGS_FONT_OPTIONS)
      strlcpy(title, "FONT OPTIONS", sizeof(title));
   else if (menu_type == MENU_SETTINGS_GENERAL_OPTIONS)
      strlcpy(title, "GENERAL OPTIONS", sizeof(title));
   else if (menu_type == MENU_SETTINGS_AUDIO_OPTIONS)
      strlcpy(title, "AUDIO OPTIONS", sizeof(title));
   else if (menu_type == MENU_SETTINGS_DISK_OPTIONS)
      strlcpy(title, "DISK OPTIONS", sizeof(title));
   else if (menu_type == MENU_SETTINGS_CORE_OPTIONS)
      strlcpy(title, "CORE OPTIONS", sizeof(title));
   else if (menu_type == MENU_SETTINGS_CORE_INFO)
      strlcpy(title, "CORE INFO", sizeof(title));		  
   else if (menu_type == MENU_SETTINGS_PRIVACY_OPTIONS)
      strlcpy(title, "PRIVACY OPTIONS", sizeof(title)); 	  
#ifdef HAVE_SHADER_MANAGER
   else if (menu_type_is == MENU_SETTINGS_SHADER_OPTIONS)
      snprintf(title, sizeof(title), "SHADER %s", dir);
#endif
   else if ((menu_type == MENU_SETTINGS_INPUT_OPTIONS) ||
         (menu_type == MENU_SETTINGS_PATH_OPTIONS) ||
         (menu_type == MENU_SETTINGS_OPTIONS) ||
         (menu_type == MENU_SETTINGS_CUSTOM_VIEWPORT || menu_type == MENU_SETTINGS_CUSTOM_VIEWPORT_2) ||
         menu_type == MENU_SETTINGS_CUSTOM_BIND ||
         menu_type == MENU_START_SCREEN ||
         menu_type == MENU_SETTINGS)
      snprintf(title, sizeof(title), "MENU %s", dir);
   else if (menu_type == MENU_SETTINGS_OPEN_HISTORY)
      strlcpy(title, "LOAD HISTORY", sizeof(title));
   else if (menu_type == MENU_INFO_SCREEN)
      strlcpy(title, "INFO", sizeof(title));
#ifdef HAVE_OVERLAY
   else if (menu_type == MENU_SETTINGS_OVERLAY_PRESET)
      snprintf(title, sizeof(title), "OVERLAY %s", dir);
#endif
   else if (menu_type == MENU_SETTINGS_VIDEO_SOFTFILTER)
      snprintf(title, sizeof(title), "FILTER %s", dir);
   else if (menu_type == MENU_SETTINGS_AUDIO_DSP_FILTER)
      snprintf(title, sizeof(title), "DSP FILTER %s", dir);
   else if (menu_type == MENU_BROWSER_DIR_PATH)
      snprintf(title, sizeof(title), "BROWSER DIR %s", dir);
   else if (menu_type == MENU_CONTENT_DIR_PATH)
      snprintf(title, sizeof(title), "CONTENT DIR %s", dir);
   else if (menu_type == MENU_SCREENSHOT_DIR_PATH)
      snprintf(title, sizeof(title), "SCREENSHOT DIR %s", dir);
   else if (menu_type == MENU_AUTOCONFIG_DIR_PATH)
      snprintf(title, sizeof(title), "AUTOCONFIG DIR %s", dir);
   else if (menu_type == MENU_SHADER_DIR_PATH)
      snprintf(title, sizeof(title), "SHADER DIR %s", dir);
   else if (menu_type == MENU_FILTER_DIR_PATH)
      snprintf(title, sizeof(title), "FILTER DIR %s", dir);
   else if (menu_type == MENU_DSP_FILTER_DIR_PATH)
      snprintf(title, sizeof(title), "DSP_FILTER DIR %s", dir);
   else if (menu_type == MENU_SAVESTATE_DIR_PATH)
      snprintf(title, sizeof(title), "SAVESTATE DIR %s", dir);
#ifdef HAVE_DYNAMIC
   else if (menu_type == MENU_LIBRETRO_DIR_PATH)
      snprintf(title, sizeof(title), "LIBRETRO DIR %s", dir);
#endif
   else if (menu_type == MENU_CONFIG_DIR_PATH)
      snprintf(title, sizeof(title), "CONFIG DIR %s", dir);
   else if (menu_type == MENU_SAVEFILE_DIR_PATH)
      snprintf(title, sizeof(title), "SAVEFILE DIR %s", dir);
#ifdef HAVE_OVERLAY
   else if (menu_type == MENU_OVERLAY_DIR_PATH)
      snprintf(title, sizeof(title), "OVERLAY DIR %s", dir);
#endif
   else if (menu_type == MENU_SYSTEM_DIR_PATH)
      snprintf(title, sizeof(title), "SYSTEM DIR %s", dir);
   else if (menu_type == MENU_ASSETS_DIR_PATH)
      snprintf(title, sizeof(title), "ASSETS DIR %s", dir);
   else
   {
      if (driver.menu->defer_core)
         snprintf(title, sizeof(title), "CONTENT %s", dir);
      else
      {
         const char *core_name = driver.menu->info.library_name;
         if (!core_name)
            core_name = g_extern.system.info.library_name;
         if (!core_name)
            core_name = "No Core";
         snprintf(title, sizeof(title), "CONTENT (%s) %s", core_name, dir);
      }
   }

   mbstowcs(strw_buffer, title, sizeof(strw_buffer) / sizeof(wchar_t));
   XuiTextElementSetText(m_menutitle, strw_buffer);

   char title_buf[256];
   menu_ticker_line(title_buf, RXUI_TERM_WIDTH - 3, g_extern.frame_count / 15, title, true);
   blit_line(RXUI_TERM_START_X + 15, 15, title_buf, true);

   char title_msg[64];
   const char *core_name = driver.menu->info.library_name;
   if (!core_name)
      core_name = g_extern.system.info.library_name;
   if (!core_name)
      core_name = "No Core";

   const char *core_version = driver.menu->info.library_version;
   if (!core_version)
      core_version = g_extern.system.info.library_version;
   if (!core_version)
      core_version = "";

   snprintf(title_msg, sizeof(title_msg), "%s - %s %s", PACKAGE_VERSION, core_name, core_version);
   blit_line(RXUI_TERM_START_X + 15, (RXUI_TERM_HEIGHT * FONT_HEIGHT_STRIDE) + RXUI_TERM_START_Y + 2, title_msg, true);

   unsigned x, y;
   size_t i;

   x = RXUI_TERM_START_X;
   y = RXUI_TERM_START_Y;

   for (i = begin; i < end; i++/*, y += FONT_HEIGHT_STRIDE */)
   {
      const char *path = 0;
      unsigned type = 0;
      file_list_get_at_offset(driver.menu->selection_buf, i, &path, &type);
      char message[256];
      char type_str[256];

      unsigned w = 19;
      if (menu_type == MENU_SETTINGS_INPUT_OPTIONS || menu_type == MENU_SETTINGS_CUSTOM_BIND)
         w = 21;
      else if (menu_type == MENU_SETTINGS_PATH_OPTIONS)
         w = 24;

      if (type >= MENU_SETTINGS_SHADER_FILTER &&
            type <= MENU_SETTINGS_SHADER_LAST)
      {
         // HACK. Work around that we're using the menu_type as dir type to propagate state correctly.
         if ((menu_type_is == MENU_SETTINGS_SHADER_OPTIONS)
               && (menu_type_is == MENU_SETTINGS_SHADER_OPTIONS))
         {
            type = MENU_FILE_DIRECTORY;
            strlcpy(type_str, "(DIR)", sizeof(type_str));
            w = 5;
         }
         else if (type == MENU_SETTINGS_SHADER_OPTIONS || type == MENU_SETTINGS_SHADER_PRESET)
            strlcpy(type_str, "...", sizeof(type_str));
         else if (type == MENU_SETTINGS_SHADER_FILTER)
            snprintf(type_str, sizeof(type_str), "%s",
                  g_settings.video.smooth ? "Linear" : "Nearest");
         else if (driver.menu_ctx && driver.menu_ctx->backend && driver.menu_ctx->backend->shader_manager_get_str)
            driver.menu_ctx->backend->shader_manager_get_str(driver.menu->shader, type_str, sizeof(type_str), type);
      }
      else
      // Pretty-print libretro cores from menu.
      if (menu_type == MENU_SETTINGS_CORE || menu_type == MENU_SETTINGS_DEFERRED_CORE)
      {
         if (type == MENU_FILE_PLAIN)
         {
            strlcpy(type_str, "(CORE)", sizeof(type_str));
            file_list_get_alt_at_offset(driver.menu->selection_buf, i, &path);
            w = 6;
         }
         else
         {
            strlcpy(type_str, "(DIR)", sizeof(type_str));
            type = MENU_FILE_DIRECTORY;
            w = 5;
         }
      }
      else if (menu_type == MENU_SETTINGS_CONFIG ||
#ifdef HAVE_OVERLAY
            menu_type == MENU_SETTINGS_OVERLAY_PRESET ||
#endif
            menu_type == MENU_SETTINGS_VIDEO_SOFTFILTER ||
            menu_type == MENU_SETTINGS_AUDIO_DSP_FILTER ||
            menu_type == MENU_SETTINGS_DISK_APPEND ||
            menu_type_is == MENU_FILE_DIRECTORY)
      {
         if (type == MENU_FILE_PLAIN)
         {
            strlcpy(type_str, "(FILE)", sizeof(type_str));
            w = 6;
         }
         else if (type == MENU_FILE_USE_DIRECTORY)
         {
            *type_str = '\0';
            w = 0;
         }
         else
         {
            strlcpy(type_str, "(DIR)", sizeof(type_str));
            type = MENU_FILE_DIRECTORY;
            w = 5;
         }
      }
      else if (menu_type == MENU_SETTINGS_OPEN_HISTORY)
      {
         *type_str = '\0';
         w = 0;
      }
      else if (type >= MENU_SETTINGS_CORE_OPTION_START)
         strlcpy(type_str,
               core_option_get_val(g_extern.system.core_options, type - MENU_SETTINGS_CORE_OPTION_START),
               sizeof(type_str));
      else if (driver.menu_ctx && driver.menu_ctx->backend && driver.menu_ctx->backend->setting_set_label)
         driver.menu_ctx->backend->setting_set_label(type_str, sizeof(type_str), &w, type);

      char entry_title_buf[256];
      char type_str_buf[64];
      bool selected = i == driver.menu->selection_ptr;

      strlcpy(entry_title_buf, path, sizeof(entry_title_buf));
      strlcpy(type_str_buf, type_str, sizeof(type_str_buf));

#if 0
      if ((type == MENU_FILE_PLAIN || type == MENU_FILE_DIRECTORY))
         menu_ticker_line(entry_title_buf, RXUI_TERM_WIDTH - (w + 1 + 2), g_extern.frame_count / 15, path, selected);
      else
         menu_ticker_line(type_str_buf, w, g_extern.frame_count / 15, type_str, selected);
#endif

      snprintf(message, sizeof(message), "%s : %s",
            entry_title_buf,
            type_str_buf);

      wchar_t msg_w[256];
      mbstowcs(msg_w, message, sizeof(msg_w) / sizeof(wchar_t));
      XuiListSetText(m_menulist, i, msg_w);
      blit_line(x, y, message, i);
   }

   if (driver.menu->keyboard.display)
   {
      char msg[1024];
      const char *str = *driver.menu->keyboard.buffer;
      if (!str)
         str = "";
      snprintf(msg, sizeof(msg), "%s\n%s", driver.menu->keyboard.label, str);
      rmenu_xui_render_messagebox(msg);
   }
}
Esempio n. 2
0
static void rmenu_xui_render(void)
{
   size_t begin, end;
   char title[256];
   const char *dir = NULL;
   const char *label = NULL;
   unsigned menu_type = 0;

   if (!driver.menu || driver.menu->need_refresh && 
         g_extern.is_menu && !driver.menu->msg_force)
      return;

   begin = driver.menu->selection_ptr;
   end   = menu_list_get_size(driver.menu->menu_list);

   rmenu_xui_render_background();

   menu_list_get_last_stack(driver.menu->menu_list, &dir,
         &label, &menu_type);

   get_title(label, dir, menu_type,
         title, sizeof(title));

   mbstowcs(strw_buffer, title, sizeof(strw_buffer) / sizeof(wchar_t));
   XuiTextElementSetText(m_menutitle, strw_buffer);

   char title_buf[256];
   menu_ticker_line(title_buf, RXUI_TERM_WIDTH - 3,
         g_extern.frame_count / 15, title, true);
   blit_line(RXUI_TERM_START_X + 15, 15, title_buf, true);

   char title_msg[64];
   const char *core_name = g_extern.menu.info.library_name;
   if (!core_name)
      core_name = g_extern.system.info.library_name;
   if (!core_name)
      core_name = "No Core";

   const char *core_version = g_extern.menu.info.library_version;
   if (!core_version)
      core_version = g_extern.system.info.library_version;
   if (!core_version)
      core_version = "";

   snprintf(title_msg, sizeof(title_msg), "%s - %s %s",
         PACKAGE_VERSION, core_name, core_version);
   blit_line(RXUI_TERM_START_X + 15,
         (RXUI_TERM_HEIGHT * FONT_HEIGHT_STRIDE) + RXUI_TERM_START_Y + 2,
         title_msg, true);

   unsigned x, y;
   size_t i;

   x = RXUI_TERM_START_X;
   y = RXUI_TERM_START_Y;

   for (i = begin; i < end; i++/*, y += FONT_HEIGHT_STRIDE */)
   {
      char message[PATH_MAX], type_str[PATH_MAX],
           entry_title_buf[PATH_MAX], type_str_buf[PATH_MAX],
           path_buf[PATH_MAX];
      const char *path = NULL, *entry_label = NULL;
      unsigned type = 0, w = 0;
      bool selected = false;

      menu_list_get_at_offset(driver.menu->menu_list->selection_buf, i, &path,
            &entry_label, &type);

      disp_set_label(driver.menu->menu_list->selection_buf,
		  &w, type, i, label,
            type_str, sizeof(type_str), 
            entry_label, path,
            path_buf, sizeof(path_buf));

      selected = (i == driver.menu->selection_ptr);

#if 0
      if ((type == MENU_FILE_PLAIN || type == MENU_FILE_DIRECTORY))
         menu_ticker_line(entry_title_buf, RXUI_TERM_WIDTH - (w + 1 + 2), g_extern.frame_count / 15, path, selected);
      else
         menu_ticker_line(type_str_buf, w, g_extern.frame_count / 15, type_str, selected);
#endif

      snprintf(message, sizeof(message), "%s : %s",
            entry_title_buf,
            type_str_buf);

      wchar_t msg_w[256];
      mbstowcs(msg_w, message, sizeof(msg_w) / sizeof(wchar_t));
      XuiListSetText(m_menulist, i, msg_w);
      blit_line(x, y, message, i);
   }

   if (driver.menu->keyboard.display)
   {
      char msg[1024];
      const char *str = *driver.menu->keyboard.buffer;
      if (!str)
         str = "";
      snprintf(msg, sizeof(msg), "%s\n%s", driver.menu->keyboard.label, str);
      rmenu_xui_render_messagebox(msg);
   }
}
Esempio n. 3
0
static void rmenu_xui_render(void)
{
	size_t end, i;
	char title[PATH_MAX_LENGTH];
	const char *dir = NULL, *label = NULL;
	unsigned menu_type = 0;
   menu_handle_t *menu = menu_driver_resolve();

   if (!menu)
      return;
	if (menu->need_refresh && 
		g_runloop.is_menu && !menu->msg_force)
		return;

   g_runloop.frames.video.current.menu.animation.is_active = false;
   g_runloop.frames.video.current.menu.label.is_updated    = false;
   g_runloop.frames.video.current.menu.framebuf.dirty      = false;

	rmenu_xui_render_background();

	menu_list_get_last_stack(menu->menu_list, &dir, &label, &menu_type);

	if (XuiHandleIsValid(m_menutitle))
	{
		get_title(label, dir, menu_type, title, sizeof(title));
		mbstowcs(strw_buffer, title, sizeof(strw_buffer) / sizeof(wchar_t));
		XuiTextElementSetText(m_menutitle, strw_buffer);
		menu_animation_ticker_line(title, RXUI_TERM_WIDTH - 3, g_runloop.frames.video.count / 15, title, true);
	}

	if (XuiHandleIsValid(m_menutitle))
	{
      const char *core_version = NULL;
		const char *core_name    = g_extern.menu.info.library_name;
		if (!core_name)
			core_name = g_extern.system.info.library_name;
		if (!core_name)
			core_name = "No Core";

		core_version = g_extern.menu.info.library_version;
		if (!core_version)
			core_version = g_extern.system.info.library_version;
		if (!core_version)
			core_version = "";

		snprintf(title, sizeof(title), "%s - %s %s",
			PACKAGE_VERSION, core_name, core_version);

		mbstowcs(strw_buffer, title, sizeof(strw_buffer) / sizeof(wchar_t));
		XuiTextElementSetText(m_menutitlebottom, strw_buffer);
	}

	end = menu_list_get_size(menu->menu_list);
	for (i = 0; i < end; i++)
   {
      wchar_t msg_left[PATH_MAX_LENGTH], msg_right[PATH_MAX_LENGTH];
      char type_str[PATH_MAX_LENGTH], path_buf[PATH_MAX_LENGTH];
      const char *path = NULL, *entry_label = NULL;
      unsigned type = 0, w = 0;
      menu_file_list_cbs_t *cbs = NULL;

      menu_list_get_at_offset(menu->menu_list->selection_buf, i, &path,
            &entry_label, &type);

      cbs = (menu_file_list_cbs_t*)
         menu_list_get_actiondata_at_offset(menu->menu_list->selection_buf,
               i);

      if (cbs && cbs->action_get_representation)
         cbs->action_get_representation(menu->menu_list->selection_buf,
               &w, type, i, label,
               type_str, sizeof(type_str), 
               entry_label, path,
               path_buf, sizeof(path_buf));

      mbstowcs(msg_left, path_buf, sizeof(msg_left) / sizeof(wchar_t));
      mbstowcs(msg_right, type_str, sizeof(msg_right) / sizeof(wchar_t));
      rmenu_xui_set_list_text(i, msg_left, msg_right);
   }
	XuiListSetCurSelVisible(m_menulist, menu->navigation.selection_ptr);

	if (menu->keyboard.display)
	{
		char msg[1024];
		const char *str = *menu->keyboard.buffer;
		if (!str)
			str = "";
		snprintf(msg, sizeof(msg), "%s\n%s", menu->keyboard.label, str);
		rmenu_xui_render_messagebox(msg);			
	}
}
Esempio n. 4
0
static void rmenu_xui_render(void)
{
	size_t end, i;
	char title[PATH_MAX_LENGTH] = {0};
	const char *dir             = NULL;
   const char *label           = NULL;
	unsigned menu_type          = 0;
   menu_handle_t *menu         = menu_driver_get_ptr();
   menu_animation_t *anim      = menu_animation_get_ptr();
   menu_display_t *disp        = menu_display_get_ptr();
   menu_framebuf_t *frame_buf  = menu_display_fb_get_ptr();
   menu_navigation_t *nav      = menu_navigation_get_ptr();
   uint64_t frame_count        = video_driver_get_frame_count();

   if (!menu)
      return;
   if (
         menu_entries_needs_refresh() && 
         menu_driver_alive() &&
         !disp->msg_force
      )
		return;

   menu_display_fb_unset_dirty();
   anim->is_active = false;
   anim->label.is_updated    = false;

	rmenu_xui_render_background();

	if (XuiHandleIsValid(m_menutitle))
	{
      menu_entries_get_title(title, sizeof(title));
		mbstowcs(strw_buffer, title, sizeof(strw_buffer) / sizeof(wchar_t));
		XuiTextElementSetText(m_menutitle, strw_buffer);
		menu_animation_ticker_line(title, RXUI_TERM_WIDTH - 3, (unsigned int)frame_count / 15, title, true);
	}

	if (XuiHandleIsValid(m_menutitle))
	{
      menu_entries_get_core_title(title, sizeof(title));

		mbstowcs(strw_buffer, title, sizeof(strw_buffer) / sizeof(wchar_t));
		XuiTextElementSetText(m_menutitlebottom, strw_buffer);
	}

	end = menu_entries_get_end();
	for (i = 0; i < end; i++)
   {
      char entry_path[PATH_MAX_LENGTH]  = {0};
      char entry_value[PATH_MAX_LENGTH] = {0};
      char msg_right[PATH_MAX_LENGTH]   = {0};
      wchar_t msg_left[PATH_MAX_LENGTH] = {0};

      menu_entry_get_value(i, entry_value, sizeof(entry_value));
      menu_entry_get_path(i, entry_path, sizeof(entry_path));

      mbstowcs(msg_left,  entry_path,  sizeof(msg_left)  / sizeof(wchar_t));
      mbstowcs(msg_right, entry_value, sizeof(msg_right) / sizeof(wchar_t));
      rmenu_xui_set_list_text(i, msg_left, msg_right);
   }
	XuiListSetCurSelVisible(m_menulist, nav->selection_ptr);

	if (menu->keyboard.display)
	{
		char msg[1024]  = {0};
		const char *str = *menu->keyboard.buffer;

		if (!str)
			str = "";
		snprintf(msg, sizeof(msg), "%s\n%s", menu->keyboard.label, str);
		rmenu_xui_render_messagebox(msg);			
	}
}
Esempio n. 5
0
static void rmenu_xui_render(void)
{
   bool display_kb, msg_force;
   unsigned fb_width;
	size_t end, i, selection;
	char title[PATH_MAX_LENGTH] = {0};
	const char *dir             = NULL;
   const char *label           = NULL;
	unsigned menu_type          = 0;
   menu_handle_t *menu         = menu_driver_get_ptr();
   uint64_t frame_count        = video_driver_get_frame_count();

   menu_display_ctl(MENU_DISPLAY_CTL_WIDTH,     &fb_width);
   menu_display_ctl(MENU_DISPLAY_CTL_MSG_FORCE, &msg_force);

   if (!menu)
      return;
   if (
         menu_entries_needs_refresh() && 
         menu_driver_alive() &&
         !msg_force
      )
		return;

   menu_display_fb_unset_dirty();
   menu_animation_clear_active();

	rmenu_xui_render_background();

	if (XuiHandleIsValid(m_menutitle))
	{
      menu_entries_get_title(title, sizeof(title));
		mbstowcs(strw_buffer, title, sizeof(strw_buffer) / sizeof(wchar_t));
		XuiTextElementSetText(m_menutitle, strw_buffer);
		menu_animation_ticker_str(title, RXUI_TERM_WIDTH(fb_width) - 3, (unsigned int)frame_count / 15, title, true);
	}

	if (XuiHandleIsValid(m_menutitle))
	{
      if (menu_entries_get_core_title(title, sizeof(title)) == 0)
      {
         mbstowcs(strw_buffer, title, sizeof(strw_buffer) / sizeof(wchar_t));
         XuiTextElementSetText(m_menutitlebottom, strw_buffer);
      }
	}

	end = menu_entries_get_end();
	for (i = 0; i < end; i++)
   {
      char entry_path[PATH_MAX_LENGTH]  = {0};
      char entry_value[PATH_MAX_LENGTH] = {0};
      char msg_right[PATH_MAX_LENGTH]   = {0};
      wchar_t msg_left[PATH_MAX_LENGTH] = {0};

      menu_entry_get_value(i, entry_value, sizeof(entry_value));
      menu_entry_get_path(i, entry_path, sizeof(entry_path));

      mbstowcs(msg_left,  entry_path,  sizeof(msg_left)  / sizeof(wchar_t));
      mbstowcs(msg_right, entry_value, sizeof(msg_right) / sizeof(wchar_t));
      rmenu_xui_set_list_text(i, msg_left, msg_right);
   }
   if (!menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &selection))
      return;
	XuiListSetCurSelVisible(m_menulist, selection);

   menu_input_ctl(MENU_INPUT_CTL_KEYBOARD_DISPLAY, &display_kb);

   if (display_kb)
	{
		char msg[1024]  = {0};
      const char *str = NULL, *label = NULL;
      menu_input_ctl(MENU_INPUT_CTL_KEYBOARD_BUFF_PTR, &str);
      menu_input_ctl(MENU_INPUT_CTL_KEYBOARD_LABEL,    &label);

		if (!str)
			str = "";
		snprintf(msg, sizeof(msg), "%s\n%s", menu->keyboard.label, str);
		rmenu_xui_render_messagebox(msg);			
	}
}