mirror of
https://github.com/libretro/RetroArch
synced 2025-02-25 03:40:50 +00:00
Use ticker line across the board.
This commit is contained in:
parent
65deccfcad
commit
1540cb9bba
@ -435,16 +435,9 @@ static void render_text(rgui_handle_t *rgui)
|
|||||||
snprintf(title, sizeof(title), "GAME (%s) %s", core_name, dir);
|
snprintf(title, sizeof(title), "GAME (%s) %s", core_name, dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ensure that directory doesn't overflow terminal.
|
char title_buf[256];
|
||||||
size_t title_len = strlen(title);
|
menu_ticker_line(title_buf, TERM_WIDTH - 3, g_extern.frame_count / 15, title);
|
||||||
if (title_len > TERM_WIDTH - 3)
|
blit_line(rgui, TERM_START_X + 15, 15, title_buf, true);
|
||||||
{
|
|
||||||
size_t start = title_len - (TERM_WIDTH - 7);
|
|
||||||
memmove(title + 4, title + start, title_len - start + 1);
|
|
||||||
memcpy(title, "... ", 4);
|
|
||||||
}
|
|
||||||
|
|
||||||
blit_line(rgui, TERM_START_X + 15, 15, title, true);
|
|
||||||
|
|
||||||
char title_msg[64];
|
char title_msg[64];
|
||||||
const char *core_name = rgui->info.library_name;
|
const char *core_name = rgui->info.library_name;
|
||||||
@ -746,15 +739,7 @@ static void render_text(rgui_handle_t *rgui)
|
|||||||
strlcpy(type_str_buf, type_str, sizeof(type_str_buf));
|
strlcpy(type_str_buf, type_str, sizeof(type_str_buf));
|
||||||
|
|
||||||
if ((type == RGUI_FILE_PLAIN || type == RGUI_FILE_DIRECTORY))
|
if ((type == RGUI_FILE_PLAIN || type == RGUI_FILE_DIRECTORY))
|
||||||
{
|
menu_ticker_line(entry_title_buf, TERM_WIDTH - (w + 1 + 2), g_extern.frame_count / 15, path);
|
||||||
size_t path_len = strlen(path);
|
|
||||||
// Trim long filenames. Don't ticker line these.
|
|
||||||
if (path_len > TERM_WIDTH - (w + 1 + 2))
|
|
||||||
{
|
|
||||||
snprintf(entry_title_buf, sizeof(entry_title_buf),
|
|
||||||
"%.*s...%s", TERM_WIDTH - (w + 1 + 2) - 8, path, &path[path_len - 5]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
menu_ticker_line(type_str_buf, w, g_extern.frame_count / 15, type_str);
|
menu_ticker_line(type_str_buf, w, g_extern.frame_count / 15, type_str);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user