mirror of
https://github.com/libretro/RetroArch
synced 2025-02-03 08:54:13 +00:00
Cleanups
This commit is contained in:
parent
cb45f08db8
commit
81fc3a1361
@ -172,17 +172,9 @@ static const blissbox_pad_type_t* input_autoconfigure_get_blissbox_pad_type_win3
|
||||
unsigned len = 0;
|
||||
unsigned i = 0;
|
||||
char vidPidString[32] = {0};
|
||||
char vidString[5] = {0};
|
||||
char pidString[5] = {0};
|
||||
char report[USB_PACKET_CTRL_LEN + 1] = {0};
|
||||
|
||||
snprintf(vidString, sizeof(vidString), "%04x", vid);
|
||||
snprintf(pidString, sizeof(pidString), "%04x", pid);
|
||||
|
||||
strlcat(vidPidString, "vid_", sizeof(vidPidString));
|
||||
strlcat(vidPidString, vidString, sizeof(vidPidString));
|
||||
strlcat(vidPidString, "&pid_", sizeof(vidPidString));
|
||||
strlcat(vidPidString, pidString, sizeof(vidPidString));
|
||||
snprintf(vidPidString, sizeof(vidPidString), "vid_%04x&pid_%04x", vid, pid);
|
||||
|
||||
HidD_GetHidGuid(&guidDeviceInterface);
|
||||
|
||||
|
@ -197,7 +197,7 @@ static uint32_t task_core_updater_get_core_crc(const char *core_path)
|
||||
{
|
||||
uint32_t crc = 0;
|
||||
|
||||
/* Get crc value */
|
||||
/* Get CRC value */
|
||||
bool success = intfstream_get_crc(core_file, &crc);
|
||||
|
||||
/* Close core file */
|
||||
|
@ -166,7 +166,6 @@ static void task_pl_manager_reset_cores_handler(retro_task_t *task)
|
||||
switch (pl_manager->status)
|
||||
{
|
||||
case PL_MANAGER_BEGIN:
|
||||
{
|
||||
/* Load playlist */
|
||||
if (!path_is_valid(pl_manager->playlist_config.path))
|
||||
goto task_finished;
|
||||
@ -183,7 +182,6 @@ static void task_pl_manager_reset_cores_handler(retro_task_t *task)
|
||||
|
||||
/* All good - can start iterating */
|
||||
pl_manager->status = PL_MANAGER_ITERATE_ENTRY_RESET_CORE;
|
||||
}
|
||||
break;
|
||||
case PL_MANAGER_ITERATE_ENTRY_RESET_CORE:
|
||||
{
|
||||
@ -270,7 +268,8 @@ task_finished:
|
||||
task_set_finished(task, true);
|
||||
}
|
||||
|
||||
static bool task_pl_manager_reset_cores_finder(retro_task_t *task, void *user_data)
|
||||
static bool task_pl_manager_reset_cores_finder(
|
||||
retro_task_t *task, void *user_data)
|
||||
{
|
||||
pl_manager_handle_t *pl_manager = NULL;
|
||||
|
||||
@ -284,7 +283,8 @@ static bool task_pl_manager_reset_cores_finder(retro_task_t *task, void *user_da
|
||||
if (!pl_manager)
|
||||
return false;
|
||||
|
||||
return string_is_equal((const char*)user_data, pl_manager->playlist_config.path);
|
||||
return string_is_equal((const char*)user_data,
|
||||
pl_manager->playlist_config.path);
|
||||
}
|
||||
|
||||
bool task_push_pl_manager_reset_cores(const playlist_config_t *playlist_config)
|
||||
@ -293,7 +293,8 @@ bool task_push_pl_manager_reset_cores(const playlist_config_t *playlist_config)
|
||||
char playlist_name[PATH_MAX_LENGTH];
|
||||
char task_title[PATH_MAX_LENGTH];
|
||||
retro_task_t *task = task_init();
|
||||
pl_manager_handle_t *pl_manager = (pl_manager_handle_t*)calloc(1, sizeof(pl_manager_handle_t));
|
||||
pl_manager_handle_t *pl_manager = (pl_manager_handle_t*)
|
||||
calloc(1, sizeof(pl_manager_handle_t));
|
||||
|
||||
playlist_name[0] = '\0';
|
||||
task_title[0] = '\0';
|
||||
@ -305,7 +306,8 @@ bool task_push_pl_manager_reset_cores(const playlist_config_t *playlist_config)
|
||||
if (string_is_empty(playlist_config->path))
|
||||
goto error;
|
||||
|
||||
fill_pathname_base_noext(playlist_name, playlist_config->path, sizeof(playlist_name));
|
||||
fill_pathname_base_noext(playlist_name,
|
||||
playlist_config->path, sizeof(playlist_name));
|
||||
|
||||
if (string_is_empty(playlist_name))
|
||||
goto error;
|
||||
@ -590,7 +592,6 @@ static void task_pl_manager_clean_playlist_handler(retro_task_t *task)
|
||||
}
|
||||
break;
|
||||
case PL_MANAGER_VALIDATE_END:
|
||||
{
|
||||
/* Sanity check - if all (or all but one)
|
||||
* playlist entries were removed during the
|
||||
* 'validate' phase, we can stop now */
|
||||
@ -604,7 +605,6 @@ static void task_pl_manager_clean_playlist_handler(retro_task_t *task)
|
||||
* start the duplicates check */
|
||||
pl_manager->list_index = 0;
|
||||
pl_manager->status = PL_MANAGER_ITERATE_ENTRY_CHECK_DUPLICATE;
|
||||
}
|
||||
break;
|
||||
case PL_MANAGER_ITERATE_ENTRY_CHECK_DUPLICATE:
|
||||
{
|
||||
@ -659,7 +659,6 @@ static void task_pl_manager_clean_playlist_handler(retro_task_t *task)
|
||||
}
|
||||
break;
|
||||
case PL_MANAGER_CHECK_DUPLICATE_END:
|
||||
{
|
||||
/* Sanity check - if all (or all but one)
|
||||
* playlist entries were removed during the
|
||||
* 'check duplicate' phase, we can stop now */
|
||||
@ -673,7 +672,6 @@ static void task_pl_manager_clean_playlist_handler(retro_task_t *task)
|
||||
* start building the M3U file list */
|
||||
pl_manager->list_index = 0;
|
||||
pl_manager->status = PL_MANAGER_ITERATE_FETCH_M3U;
|
||||
}
|
||||
break;
|
||||
case PL_MANAGER_ITERATE_FETCH_M3U:
|
||||
{
|
||||
@ -790,7 +788,8 @@ task_finished:
|
||||
task_set_finished(task, true);
|
||||
}
|
||||
|
||||
static bool task_pl_manager_clean_playlist_finder(retro_task_t *task, void *user_data)
|
||||
static bool task_pl_manager_clean_playlist_finder(
|
||||
retro_task_t *task, void *user_data)
|
||||
{
|
||||
pl_manager_handle_t *pl_manager = NULL;
|
||||
|
||||
@ -804,16 +803,19 @@ static bool task_pl_manager_clean_playlist_finder(retro_task_t *task, void *user
|
||||
if (!pl_manager)
|
||||
return false;
|
||||
|
||||
return string_is_equal((const char*)user_data, pl_manager->playlist_config.path);
|
||||
return string_is_equal((const char*)user_data,
|
||||
pl_manager->playlist_config.path);
|
||||
}
|
||||
|
||||
bool task_push_pl_manager_clean_playlist(const playlist_config_t *playlist_config)
|
||||
bool task_push_pl_manager_clean_playlist(
|
||||
const playlist_config_t *playlist_config)
|
||||
{
|
||||
task_finder_data_t find_data;
|
||||
char playlist_name[PATH_MAX_LENGTH];
|
||||
char task_title[PATH_MAX_LENGTH];
|
||||
retro_task_t *task = task_init();
|
||||
pl_manager_handle_t *pl_manager = (pl_manager_handle_t*)calloc(1, sizeof(pl_manager_handle_t));
|
||||
pl_manager_handle_t *pl_manager = (pl_manager_handle_t*)
|
||||
calloc(1, sizeof(pl_manager_handle_t));
|
||||
|
||||
playlist_name[0] = '\0';
|
||||
task_title[0] = '\0';
|
||||
@ -825,7 +827,8 @@ bool task_push_pl_manager_clean_playlist(const playlist_config_t *playlist_confi
|
||||
if (string_is_empty(playlist_config->path))
|
||||
goto error;
|
||||
|
||||
fill_pathname_base_noext(playlist_name, playlist_config->path, sizeof(playlist_name));
|
||||
fill_pathname_base_noext(playlist_name,
|
||||
playlist_config->path, sizeof(playlist_name));
|
||||
|
||||
if (string_is_empty(playlist_name))
|
||||
goto error;
|
||||
|
Loading…
x
Reference in New Issue
Block a user