mirror of
https://github.com/libretro/RetroArch
synced 2025-02-05 15:40:04 +00:00
check if saving undo data was successful
This commit is contained in:
parent
28aafddd91
commit
93acf0caa9
10
command.c
10
command.c
@ -1479,7 +1479,13 @@ static void command_event_save_state(const char *path,
|
||||
path_remove_extension(buf);
|
||||
snprintf(buf, sizeof(buf), "%s.last", buf);
|
||||
|
||||
content_rename_state(path, buf);
|
||||
if (!content_rename_state(path, buf))
|
||||
{
|
||||
snprintf(s, len, "%s \"%s\".",
|
||||
"Failed to save undo information\n",
|
||||
buf);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!content_save_state(path))
|
||||
@ -1519,7 +1525,7 @@ static void command_event_load_state(const char *path, char *s, size_t len, bool
|
||||
path_remove_extension(buf);
|
||||
snprintf(buf, sizeof(buf), "%s.undo", buf);
|
||||
|
||||
if(!content_save_state(buf))
|
||||
if (!content_save_state(buf))
|
||||
{
|
||||
snprintf(s, len, "%s \"%s\".",
|
||||
"Failed to save undo information\n",
|
||||
|
Loading…
x
Reference in New Issue
Block a user