mirror of
https://github.com/libretro/RetroArch
synced 2025-04-18 14:42:30 +00:00
Get rid of callback function hashes
This commit is contained in:
parent
45cde3c49e
commit
457d543cb1
@ -2266,23 +2266,24 @@ static int action_ok_undo_save_state(const char *path,
|
|||||||
#ifdef HAVE_ZLIB
|
#ifdef HAVE_ZLIB
|
||||||
static void cb_decompressed(void *task_data, void *user_data, const char *err)
|
static void cb_decompressed(void *task_data, void *user_data, const char *err)
|
||||||
{
|
{
|
||||||
decompress_task_data_t *dec = (decompress_task_data_t*)task_data;
|
decompress_task_data_t *dec = (decompress_task_data_t*)task_data;
|
||||||
|
enum msg_hash_enums *enum_idx = (enum msg_hash_enums*)user_data;
|
||||||
|
|
||||||
if (dec && !err)
|
if (dec && !err && enum_idx)
|
||||||
{
|
{
|
||||||
unsigned type_hash = (unsigned)(uintptr_t)user_data;
|
const char *msg = msg_hash_to_str(*enum_idx);
|
||||||
|
|
||||||
switch (type_hash)
|
if (string_is_equal(msg,
|
||||||
{
|
msg_hash_to_str(MENU_ENUM_LABEL_CB_CORE_UPDATER_DOWNLOAD)))
|
||||||
case CB_CORE_UPDATER_DOWNLOAD:
|
generic_action_ok_command(CMD_EVENT_CORE_INFO_INIT);
|
||||||
generic_action_ok_command(CMD_EVENT_CORE_INFO_INIT);
|
else if (string_is_equal(msg,
|
||||||
break;
|
msg_hash_to_str(MENU_ENUM_LABEL_CB_UPDATE_ASSETS)))
|
||||||
case CB_UPDATE_ASSETS:
|
generic_action_ok_command(CMD_EVENT_REINIT);
|
||||||
generic_action_ok_command(CMD_EVENT_REINIT);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (user_data)
|
||||||
|
free(user_data);
|
||||||
|
|
||||||
if (err)
|
if (err)
|
||||||
RARCH_ERR("%s", err);
|
RARCH_ERR("%s", err);
|
||||||
|
|
||||||
@ -2538,10 +2539,13 @@ static void cb_generic_download(void *task_data,
|
|||||||
|
|
||||||
if (path_is_compressed_file(output_path))
|
if (path_is_compressed_file(output_path))
|
||||||
{
|
{
|
||||||
|
enum msg_hash_enums *idx = (enum msg_hash_enums*)calloc(1, sizeof(*idx));
|
||||||
|
|
||||||
|
*idx = transf->enum_idx;
|
||||||
|
|
||||||
if (!task_push_decompress(output_path, dir_path,
|
if (!task_push_decompress(output_path, dir_path,
|
||||||
NULL, NULL, NULL,
|
NULL, NULL, NULL,
|
||||||
cb_decompressed, (void*)(uintptr_t)
|
cb_decompressed, idx))
|
||||||
msg_hash_calculate(msg_hash_to_str(transf->enum_idx))))
|
|
||||||
{
|
{
|
||||||
err = msg_hash_to_str(MSG_DECOMPRESSION_FAILED);
|
err = msg_hash_to_str(MSG_DECOMPRESSION_FAILED);
|
||||||
goto finish;
|
goto finish;
|
||||||
|
@ -1735,12 +1735,6 @@ enum msg_hash_enums
|
|||||||
MSG_LAST
|
MSG_LAST
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/* Callback strings */
|
|
||||||
|
|
||||||
#define CB_CORE_UPDATER_DOWNLOAD 0x7412da7dU
|
|
||||||
#define CB_UPDATE_ASSETS 0xbf85795eU
|
|
||||||
|
|
||||||
/* Deferred */
|
/* Deferred */
|
||||||
|
|
||||||
#define MENU_LABEL_DEFERRED_VIDEO_FILTER 0x966ad201U
|
#define MENU_LABEL_DEFERRED_VIDEO_FILTER 0x966ad201U
|
||||||
|
@ -243,7 +243,7 @@ bool task_check_decompress(const char *source_file)
|
|||||||
task_finder_data_t find_data;
|
task_finder_data_t find_data;
|
||||||
|
|
||||||
/* Prepare find parameters */
|
/* Prepare find parameters */
|
||||||
find_data.func = task_decompress_finder;
|
find_data.func = task_decompress_finder;
|
||||||
find_data.userdata = (void *)source_file;
|
find_data.userdata = (void *)source_file;
|
||||||
|
|
||||||
/* Return whether decompressing is in progress or not */
|
/* Return whether decompressing is in progress or not */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user