Display number of cores updated when updating installed cores
This commit is contained in:
parent
3d80838754
commit
d2e2c289a6
|
@ -880,6 +880,10 @@ MSG_HASH(
|
||||||
MSG_ALL_CORES_UPDATED,
|
MSG_ALL_CORES_UPDATED,
|
||||||
"All installed cores at latest version"
|
"All installed cores at latest version"
|
||||||
)
|
)
|
||||||
|
MSG_HASH(
|
||||||
|
MSG_NUM_CORES_UPDATED,
|
||||||
|
"cores updated: "
|
||||||
|
)
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_MENU_SCALE_FACTOR,
|
MENU_ENUM_LABEL_VALUE_MENU_SCALE_FACTOR,
|
||||||
"Menu Scale Factor"
|
"Menu Scale Factor"
|
||||||
|
|
|
@ -1902,7 +1902,7 @@ enum msg_hash_enums
|
||||||
MSG_SCANNING_CORES,
|
MSG_SCANNING_CORES,
|
||||||
MSG_CHECKING_CORE,
|
MSG_CHECKING_CORE,
|
||||||
MSG_ALL_CORES_UPDATED,
|
MSG_ALL_CORES_UPDATED,
|
||||||
|
MSG_NUM_CORES_UPDATED,
|
||||||
|
|
||||||
MENU_LABEL(VIDEO_SHADER_PARAMETERS),
|
MENU_LABEL(VIDEO_SHADER_PARAMETERS),
|
||||||
MENU_LABEL(VIDEO_SHADER_PRESET_PARAMETERS),
|
MENU_LABEL(VIDEO_SHADER_PRESET_PARAMETERS),
|
||||||
|
|
|
@ -108,6 +108,7 @@ typedef struct update_installed_cores_handle
|
||||||
size_t list_size;
|
size_t list_size;
|
||||||
size_t list_index;
|
size_t list_index;
|
||||||
size_t installed_index;
|
size_t installed_index;
|
||||||
|
unsigned num_updated;
|
||||||
enum update_installed_cores_status status;
|
enum update_installed_cores_status status;
|
||||||
} update_installed_cores_handle_t;
|
} update_installed_cores_handle_t;
|
||||||
|
|
||||||
|
@ -309,9 +310,10 @@ static void task_core_updater_get_list_handler(retro_task_t *task)
|
||||||
|
|
||||||
/* Enable menu refresh, if required */
|
/* Enable menu refresh, if required */
|
||||||
#if defined(RARCH_INTERNAL) && defined(HAVE_MENU)
|
#if defined(RARCH_INTERNAL) && defined(HAVE_MENU)
|
||||||
menu_entries_ctl(
|
if (list_handle->refresh_menu)
|
||||||
MENU_ENTRIES_CTL_UNSET_REFRESH,
|
menu_entries_ctl(
|
||||||
&list_handle->refresh_menu);
|
MENU_ENTRIES_CTL_UNSET_REFRESH,
|
||||||
|
&list_handle->refresh_menu);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
/* fall-through */
|
/* fall-through */
|
||||||
|
@ -1078,6 +1080,9 @@ static void task_update_installed_cores_handler(retro_task_t *task)
|
||||||
|
|
||||||
task_set_title(task, strdup(task_title));
|
task_set_title(task, strdup(task_title));
|
||||||
|
|
||||||
|
/* Increment 'updated cores' counter */
|
||||||
|
update_installed_handle->num_updated++;
|
||||||
|
|
||||||
/* Wait for download to complete */
|
/* Wait for download to complete */
|
||||||
update_installed_handle->status = UPDATE_INSTALLED_CORES_WAIT_DOWNLOAD;
|
update_installed_handle->status = UPDATE_INSTALLED_CORES_WAIT_DOWNLOAD;
|
||||||
}
|
}
|
||||||
|
@ -1110,10 +1115,31 @@ static void task_update_installed_cores_handler(retro_task_t *task)
|
||||||
/* Set final task title */
|
/* Set final task title */
|
||||||
task_free_title(task);
|
task_free_title(task);
|
||||||
|
|
||||||
task_set_title(task,
|
/* > Check whether core list was fetched
|
||||||
(update_installed_handle->list_size > 0) ?
|
* successfully */
|
||||||
strdup(msg_hash_to_str(MSG_ALL_CORES_UPDATED)) :
|
if (update_installed_handle->list_size > 0)
|
||||||
strdup(msg_hash_to_str(MSG_CORE_LIST_FAILED)));
|
{
|
||||||
|
/* > Check whether a non-zero number of cores
|
||||||
|
* were updated */
|
||||||
|
if (update_installed_handle->num_updated > 0)
|
||||||
|
{
|
||||||
|
char task_title[PATH_MAX_LENGTH];
|
||||||
|
|
||||||
|
task_title[0] = '\0';
|
||||||
|
|
||||||
|
snprintf(
|
||||||
|
task_title, sizeof(task_title), "%s [%s%u]",
|
||||||
|
msg_hash_to_str(MSG_ALL_CORES_UPDATED),
|
||||||
|
msg_hash_to_str(MSG_NUM_CORES_UPDATED),
|
||||||
|
update_installed_handle->num_updated);
|
||||||
|
|
||||||
|
task_set_title(task, strdup(task_title));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
task_set_title(task, strdup(msg_hash_to_str(MSG_ALL_CORES_UPDATED)));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
task_set_title(task, strdup(msg_hash_to_str(MSG_CORE_LIST_FAILED)));
|
||||||
}
|
}
|
||||||
/* fall-through */
|
/* fall-through */
|
||||||
default:
|
default:
|
||||||
|
@ -1161,6 +1187,7 @@ void task_push_update_installed_cores(void)
|
||||||
update_installed_handle->list_size = 0;
|
update_installed_handle->list_size = 0;
|
||||||
update_installed_handle->list_index = 0;
|
update_installed_handle->list_index = 0;
|
||||||
update_installed_handle->installed_index = 0;
|
update_installed_handle->installed_index = 0;
|
||||||
|
update_installed_handle->num_updated = 0;
|
||||||
update_installed_handle->status = UPDATE_INSTALLED_CORES_BEGIN;
|
update_installed_handle->status = UPDATE_INSTALLED_CORES_BEGIN;
|
||||||
|
|
||||||
if (!update_installed_handle->core_list)
|
if (!update_installed_handle->core_list)
|
||||||
|
|
Loading…
Reference in New Issue