mirror of
https://github.com/libretro/RetroArch
synced 2025-03-28 19:20:35 +00:00
Merge pull request #11975 from sonninnos/state-logging
Savestate logging cleanup
This commit is contained in:
commit
5555419792
@ -3553,7 +3553,7 @@ bool config_load_override(void *data)
|
||||
/* Create a new config file from core_path */
|
||||
if (config_file_exists(core_path))
|
||||
{
|
||||
RARCH_LOG("[Overrides]: Core-specific overrides found at %s.\n",
|
||||
RARCH_LOG("[Overrides]: Core-specific overrides found at \"%s\".\n",
|
||||
core_path);
|
||||
|
||||
path_set(RARCH_PATH_CONFIG_APPEND, core_path);
|
||||
@ -3561,7 +3561,7 @@ bool config_load_override(void *data)
|
||||
should_append = true;
|
||||
}
|
||||
else
|
||||
RARCH_LOG("[Overrides]: No core-specific overrides found at %s.\n",
|
||||
RARCH_LOG("[Overrides]: No core-specific overrides found at \"%s\".\n",
|
||||
core_path);
|
||||
|
||||
/* per-content-dir overrides */
|
||||
@ -3572,7 +3572,7 @@ bool config_load_override(void *data)
|
||||
|
||||
temp_path[0] = '\0';
|
||||
|
||||
RARCH_LOG("[Overrides]: Content dir-specific overrides found at %s.\n",
|
||||
RARCH_LOG("[Overrides]: Content dir-specific overrides found at \"%s\".\n",
|
||||
game_path);
|
||||
|
||||
if (should_append)
|
||||
@ -3590,7 +3590,7 @@ bool config_load_override(void *data)
|
||||
should_append = true;
|
||||
}
|
||||
else
|
||||
RARCH_LOG("[Overrides]: No content-dir-specific overrides found at %s.\n",
|
||||
RARCH_LOG("[Overrides]: No content-dir-specific overrides found at \"%s\".\n",
|
||||
content_path);
|
||||
|
||||
/* per-game overrides */
|
||||
@ -3601,12 +3601,12 @@ bool config_load_override(void *data)
|
||||
|
||||
temp_path[0] = '\0';
|
||||
|
||||
RARCH_LOG("[Overrides]: Game-specific overrides found at %s.\n",
|
||||
RARCH_LOG("[Overrides]: Game-specific overrides found at \"%s\".\n",
|
||||
game_path);
|
||||
|
||||
if (should_append)
|
||||
{
|
||||
RARCH_LOG("[Overrides]: game-specific overrides stacking on top of previous overrides\n");
|
||||
RARCH_LOG("[Overrides]: Game-specific overrides stacking on top of previous overrides.\n");
|
||||
strlcpy(temp_path, path_get(RARCH_PATH_CONFIG_APPEND), sizeof(temp_path));
|
||||
strlcat(temp_path, "|", sizeof(temp_path));
|
||||
strlcat(temp_path, game_path, sizeof(temp_path));
|
||||
@ -3619,7 +3619,7 @@ bool config_load_override(void *data)
|
||||
should_append = true;
|
||||
}
|
||||
else
|
||||
RARCH_LOG("[Overrides]: No game-specific overrides found at %s.\n",
|
||||
RARCH_LOG("[Overrides]: No game-specific overrides found at \"%s\".\n",
|
||||
game_path);
|
||||
|
||||
if (!should_append)
|
||||
@ -3729,7 +3729,7 @@ bool config_load_remap(const char *directory_input_remapping,
|
||||
|
||||
strlcpy(remap_directory,
|
||||
directory_input_remapping, sizeof(remap_directory));
|
||||
RARCH_LOG("[Remaps]: remap directory: %s\n", remap_directory);
|
||||
RARCH_LOG("[Remaps]: Remap directory: \"%s\".\n", remap_directory);
|
||||
|
||||
/* Concatenate strings into full paths for core_path, game_path */
|
||||
fill_pathname_join_special_ext(core_path,
|
||||
@ -3757,7 +3757,7 @@ bool config_load_remap(const char *directory_input_remapping,
|
||||
/* If a game remap file exists, load it. */
|
||||
if ((new_conf = config_file_new_from_path_to_string(game_path)))
|
||||
{
|
||||
RARCH_LOG("[Remaps]: game-specific remap found at %s.\n", game_path);
|
||||
RARCH_LOG("[Remaps]: Game-specific remap found at \"%s\".\n", game_path);
|
||||
if (input_remapping_load_file(new_conf, game_path))
|
||||
{
|
||||
rarch_ctl(RARCH_CTL_SET_REMAPS_GAME_ACTIVE, NULL);
|
||||
@ -3770,7 +3770,7 @@ bool config_load_remap(const char *directory_input_remapping,
|
||||
/* If a content-dir remap file exists, load it. */
|
||||
if ((new_conf = config_file_new_from_path_to_string(content_path)))
|
||||
{
|
||||
RARCH_LOG("[Remaps]: content-dir-specific remap found at %s.\n", content_path);
|
||||
RARCH_LOG("[Remaps]: Content-dir-specific remap found at \"%s\".\n", content_path);
|
||||
if (input_remapping_load_file(new_conf, content_path))
|
||||
{
|
||||
rarch_ctl(RARCH_CTL_SET_REMAPS_CONTENT_DIR_ACTIVE, NULL);
|
||||
@ -3782,7 +3782,7 @@ bool config_load_remap(const char *directory_input_remapping,
|
||||
/* If a core remap file exists, load it. */
|
||||
if ((new_conf = config_file_new_from_path_to_string(core_path)))
|
||||
{
|
||||
RARCH_LOG("[Remaps]: core-specific remap found at %s.\n", core_path);
|
||||
RARCH_LOG("[Remaps]: Core-specific remap found at \"%s\".\n", core_path);
|
||||
if (input_remapping_load_file(new_conf, core_path))
|
||||
{
|
||||
rarch_ctl(RARCH_CTL_SET_REMAPS_CORE_ACTIVE, NULL);
|
||||
@ -4402,15 +4402,15 @@ bool config_save_overrides(enum override_type type, void *data)
|
||||
switch (type)
|
||||
{
|
||||
case OVERRIDE_CORE:
|
||||
RARCH_LOG ("[Overrides]: path %s\n", core_path);
|
||||
RARCH_LOG ("[Overrides]: Path \"%s\".\n", core_path);
|
||||
ret = config_file_write(conf, core_path, true);
|
||||
break;
|
||||
case OVERRIDE_GAME:
|
||||
RARCH_LOG ("[Overrides]: path %s\n", game_path);
|
||||
RARCH_LOG ("[Overrides]: Path \"%s\".\n", game_path);
|
||||
ret = config_file_write(conf, game_path, true);
|
||||
break;
|
||||
case OVERRIDE_CONTENT_DIR:
|
||||
RARCH_LOG ("[Overrides]: path %s\n", content_path);
|
||||
RARCH_LOG ("[Overrides]: Path \"%s\".\n", content_path);
|
||||
ret = config_file_write(conf, content_path, true);
|
||||
break;
|
||||
case OVERRIDE_NONE:
|
||||
|
@ -413,10 +413,9 @@ bool content_undo_load_state(void)
|
||||
settings_t *settings = config_get_ptr();
|
||||
bool block_sram_overwrite = settings->bools.block_sram_overwrite;
|
||||
|
||||
RARCH_LOG("%s: \"%s\", %s: %u %s.\n",
|
||||
RARCH_LOG("[State]: %s \"%s\", %u %s.\n",
|
||||
msg_hash_to_str(MSG_LOADING_STATE),
|
||||
undo_load_buf.path,
|
||||
msg_hash_to_str(MSG_STATE_SIZE),
|
||||
(unsigned)undo_load_buf.size,
|
||||
msg_hash_to_str(MSG_BYTES));
|
||||
|
||||
@ -514,7 +513,7 @@ bool content_undo_load_state(void)
|
||||
|
||||
if (!ret)
|
||||
{
|
||||
RARCH_ERR("%s \"%s\".\n",
|
||||
RARCH_ERR("[State]: %s \"%s\".\n",
|
||||
msg_hash_to_str(MSG_FAILED_TO_UNDO_LOAD_STATE),
|
||||
undo_load_buf.path);
|
||||
}
|
||||
@ -657,7 +656,7 @@ static void task_save_handler(retro_task_t *task)
|
||||
|
||||
if (state->undo_save)
|
||||
{
|
||||
RARCH_ERR("%s \"%s\".\n",
|
||||
RARCH_ERR("[State]: %s \"%s\".\n",
|
||||
msg_hash_to_str(MSG_FAILED_TO_UNDO_SAVE_STATE),
|
||||
undo_save_buf.path);
|
||||
|
||||
@ -943,10 +942,9 @@ static void content_load_state_cb(retro_task_t *task,
|
||||
settings_t *settings = config_get_ptr();
|
||||
bool block_sram_overwrite = settings->bools.block_sram_overwrite;
|
||||
|
||||
RARCH_LOG("%s: \"%s\", %s: %u %s.\n",
|
||||
RARCH_LOG("[State]: %s \"%s\", %u %s.\n",
|
||||
msg_hash_to_str(MSG_LOADING_STATE),
|
||||
load_data->path,
|
||||
msg_hash_to_str(MSG_STATE_SIZE),
|
||||
(unsigned)size,
|
||||
msg_hash_to_str(MSG_BYTES));
|
||||
|
||||
@ -1065,7 +1063,7 @@ static void content_load_state_cb(retro_task_t *task,
|
||||
return;
|
||||
|
||||
error:
|
||||
RARCH_ERR("%s \"%s\".\n",
|
||||
RARCH_ERR("[State]: %s \"%s\".\n",
|
||||
msg_hash_to_str(MSG_FAILED_TO_LOAD_STATE),
|
||||
load_data->path);
|
||||
if (buf)
|
||||
@ -1280,16 +1278,15 @@ bool content_save_state(const char *path, bool save_to_disk, bool autosave)
|
||||
|
||||
if (!data)
|
||||
{
|
||||
RARCH_ERR("%s \"%s\".\n",
|
||||
RARCH_ERR("[State]: %s \"%s\".\n",
|
||||
msg_hash_to_str(MSG_FAILED_TO_SAVE_STATE_TO),
|
||||
path);
|
||||
return false;
|
||||
}
|
||||
|
||||
RARCH_LOG("%s: \"%s\", %s: %u %s.\n",
|
||||
RARCH_LOG("[State]: %s \"%s\", %u %s.\n",
|
||||
msg_hash_to_str(MSG_SAVING_STATE),
|
||||
path,
|
||||
msg_hash_to_str(MSG_STATE_SIZE),
|
||||
(unsigned)info.size,
|
||||
msg_hash_to_str(MSG_BYTES));
|
||||
}
|
||||
@ -1301,7 +1298,7 @@ bool content_save_state(const char *path, bool save_to_disk, bool autosave)
|
||||
/* Before overwriting the savestate file, load it into a buffer
|
||||
to allow undo_save_state() to work */
|
||||
/* TODO/FIXME - Use msg_hash_to_str here */
|
||||
RARCH_LOG("%s ...\n",
|
||||
RARCH_LOG("[State]: %s ...\n",
|
||||
msg_hash_to_str(MSG_FILE_ALREADY_EXISTS_SAVING_TO_BACKUP_BUFFER));
|
||||
|
||||
task_push_load_and_save_state(path, data, info.size, true, autosave);
|
||||
@ -1316,7 +1313,7 @@ bool content_save_state(const char *path, bool save_to_disk, bool autosave)
|
||||
|
||||
if (!data)
|
||||
{
|
||||
RARCH_ERR("%s \"%s\".\n",
|
||||
RARCH_ERR("[State]: %s \"%s\".\n",
|
||||
msg_hash_to_str(MSG_FAILED_TO_SAVE_STATE_TO),
|
||||
path);
|
||||
return false;
|
||||
@ -1440,7 +1437,7 @@ bool content_rename_state(const char *origin, const char *dest)
|
||||
if (!ret)
|
||||
return true;
|
||||
|
||||
RARCH_LOG("Error %d renaming file %s\n", ret, origin);
|
||||
RARCH_ERR("[State]: Error %d renaming file \"%s\".\n", ret, origin);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user