mirror of
https://github.com/libretro/RetroArch
synced 2025-04-10 06:44:27 +00:00
Cleanups
This commit is contained in:
parent
149e7768a0
commit
1b944c1cce
@ -1922,6 +1922,12 @@ static const char *menu_hash_to_str_us_label_enum(enum msg_hash_enums msg)
|
||||
return "shutting_down";
|
||||
case MSG_AUTODETECT:
|
||||
return "Autodetect";
|
||||
case MSG_SUCCEEDED:
|
||||
return "succeeded";
|
||||
case MSG_FAILED:
|
||||
return "failed";
|
||||
case MSG_AUTOLOADING_SAVESTATE_FROM:
|
||||
return "Auto-loading savestate from";
|
||||
case MSG_REBOOTING:
|
||||
return "rebooting";
|
||||
case MSG_CONNECTING_TO_PORT:
|
||||
@ -3171,8 +3177,6 @@ const char *msg_hash_to_str_us(enum msg_hash_enums msg)
|
||||
return "Sorry, unimplemented: cores that don't demand content cannot participate in netplay.";
|
||||
case MSG_FOUND_AUTO_SAVESTATE_IN:
|
||||
return "Found auto savestate in";
|
||||
case MSG_AUTOLOADING_SAVESTATE_FROM:
|
||||
return "Auto-loading savestate from";
|
||||
case MENU_ENUM_LABEL_VALUE_NETWORK_REMOTE_PORT:
|
||||
return "Network Remote Base Port";
|
||||
case MSG_OVERRIDES_SAVED_SUCCESSFULLY:
|
||||
|
@ -136,6 +136,8 @@ enum msg_hash_enums
|
||||
MSG_DEVICE_CONFIGURED_IN_PORT,
|
||||
MSG_DEVICE_NOT_CONFIGURED,
|
||||
MSG_DEVICE_DISCONNECTED_FROM_PORT,
|
||||
MSG_FAILED,
|
||||
MSG_SUCCEEDED,
|
||||
MSG_LOADING,
|
||||
MSG_CONNECTING_TO_PORT,
|
||||
MSG_CONNECTED_TO,
|
||||
|
@ -741,8 +741,10 @@ static void task_load_handler(retro_task_t *task)
|
||||
|
||||
msg[0] = '\0';
|
||||
|
||||
snprintf(msg, sizeof(msg), "Auto-loading savestate from \"%s\" failed.",
|
||||
state->path);
|
||||
snprintf(msg, sizeof(msg), "%s \"%s\" %s.",
|
||||
msg_hash_to_str(MSG_AUTOLOADING_SAVESTATE_FROM),
|
||||
state->path,
|
||||
msg_hash_to_str(MSG_FAILED));
|
||||
task->error = strdup(msg);
|
||||
}
|
||||
else
|
||||
@ -770,8 +772,10 @@ static void task_load_handler(retro_task_t *task)
|
||||
|
||||
if (state->autoload)
|
||||
{
|
||||
snprintf(msg, sizeof(msg), "Auto-loading savestate from \"%s\" succeeded.",
|
||||
state->path);
|
||||
snprintf(msg, sizeof(msg), "%s \"%s\" %s.",
|
||||
msg_hash_to_str(MSG_AUTOLOADING_SAVESTATE_FROM),
|
||||
state->path,
|
||||
msg_hash_to_str(MSG_SUCCEEDED));
|
||||
if (!task->mute)
|
||||
runloop_msg_queue_push(msg, 1, 180, true);
|
||||
}
|
||||
@ -945,8 +949,11 @@ static void content_load_state_cb(void *task_data,
|
||||
|
||||
error:
|
||||
if (load_data->autoload)
|
||||
snprintf(err_buf, sizeof(err_buf), "Auto-loading savestate from \"%s\" failed.",
|
||||
load_data->path);
|
||||
snprintf(err_buf, sizeof(err_buf), "%s \"%s\" %s.",
|
||||
msg_hash_to_str(MSG_AUTOLOADING_SAVESTATE_FROM),
|
||||
load_data->path,
|
||||
msg_hash_to_str(MSG_FAILED)
|
||||
);
|
||||
else
|
||||
snprintf(err_buf, sizeof(err_buf), "%s \"%s\".\n",
|
||||
msg_hash_to_str(MSG_FAILED_TO_LOAD_STATE),
|
||||
@ -1036,7 +1043,8 @@ static void content_load_and_save_state_cb(void *task_data,
|
||||
* Create a new task to load current state first into a backup buffer (for undo)
|
||||
* and then save the content state.
|
||||
**/
|
||||
static void task_push_load_and_save_state(const char *path, void *data, size_t size, bool load_to_backup_buffer, bool autosave)
|
||||
static void task_push_load_and_save_state(const char *path, void *data,
|
||||
size_t size, bool load_to_backup_buffer, bool autosave)
|
||||
{
|
||||
retro_task_t *task = (retro_task_t*)calloc(1, sizeof(*task));
|
||||
save_task_state_t *state = (save_task_state_t*)calloc(1, sizeof(*state));
|
||||
@ -1172,7 +1180,8 @@ bool content_save_state(const char *path, bool save_to_disk, bool autosave)
|
||||
*
|
||||
*
|
||||
**/
|
||||
bool content_load_state(const char *path, bool load_to_backup_buffer, bool autoload)
|
||||
bool content_load_state(const char *path,
|
||||
bool load_to_backup_buffer, bool autoload)
|
||||
{
|
||||
retro_task_t *task = (retro_task_t*)calloc(1, sizeof(*task));
|
||||
save_task_state_t *state = (save_task_state_t*)calloc(1, sizeof(*state));
|
||||
|
Loading…
x
Reference in New Issue
Block a user