mirror of
https://github.com/ventoy/Ventoy.git
synced 2025-04-14 08:16:38 -04:00
Print a tip when enumerating image files.
This commit is contained in:
parent
6ded335527
commit
3dd3b7d26f
@ -123,6 +123,10 @@ static int g_video_mode_max = 0;
|
|||||||
static int g_video_mode_num = 0;
|
static int g_video_mode_num = 0;
|
||||||
static ventoy_video_mode *g_video_mode_list = NULL;
|
static ventoy_video_mode *g_video_mode_list = NULL;
|
||||||
|
|
||||||
|
static int g_enumerate_time_checked = 0;
|
||||||
|
static grub_uint64_t g_enumerate_start_time_ms;
|
||||||
|
static grub_uint64_t g_enumerate_finish_time_ms;
|
||||||
|
|
||||||
static const char *g_menu_class[] =
|
static const char *g_menu_class[] =
|
||||||
{
|
{
|
||||||
"vtoyiso", "vtoywim", "vtoyefi", "vtoyimg", "vtoyvhd", "vtoyvtoy"
|
"vtoyiso", "vtoywim", "vtoyefi", "vtoyimg", "vtoyvhd", "vtoyvtoy"
|
||||||
@ -1174,6 +1178,18 @@ static int ventoy_collect_img_files(const char *filename, const struct grub_dirh
|
|||||||
img_iterator_node *new_node;
|
img_iterator_node *new_node;
|
||||||
img_iterator_node *node = (img_iterator_node *)data;
|
img_iterator_node *node = (img_iterator_node *)data;
|
||||||
|
|
||||||
|
if (g_enumerate_time_checked == 0)
|
||||||
|
{
|
||||||
|
g_enumerate_finish_time_ms = grub_get_time_ms();
|
||||||
|
if ((g_enumerate_finish_time_ms - g_enumerate_start_time_ms) >= 3000)
|
||||||
|
{
|
||||||
|
grub_cls();
|
||||||
|
grub_printf("\n\n Ventoy scanning files, please wait...\n");
|
||||||
|
grub_refresh();
|
||||||
|
g_enumerate_time_checked = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
len = grub_strlen(filename);
|
len = grub_strlen(filename);
|
||||||
|
|
||||||
if (info->dir)
|
if (info->dir)
|
||||||
@ -1968,6 +1984,8 @@ static grub_err_t ventoy_cmd_list_img(grub_extcmd_context_t ctxt, int argc, char
|
|||||||
return grub_error(GRUB_ERR_BAD_ARGUMENT, "Must clear image before list");
|
return grub_error(GRUB_ERR_BAD_ARGUMENT, "Must clear image before list");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_enumerate_start_time_ms = grub_get_time_ms();
|
||||||
|
|
||||||
strdata = ventoy_get_env("VTOY_FILT_DOT_UNDERSCORE_FILE");
|
strdata = ventoy_get_env("VTOY_FILT_DOT_UNDERSCORE_FILE");
|
||||||
if (strdata && strdata[0] == '1' && strdata[1] == 0)
|
if (strdata && strdata[0] == '1' && strdata[1] == 0)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user