mirror of
https://github.com/libretro/RetroArch
synced 2025-04-02 16:20:39 +00:00
Cleanups
This commit is contained in:
parent
78d3bc5015
commit
86906cf5e3
10
content.c
10
content.c
@ -180,11 +180,12 @@ bool save_state(const char *path)
|
|||||||
|
|
||||||
if (ret)
|
if (ret)
|
||||||
ret = retro_write_file(path, data, size);
|
ret = retro_write_file(path, data, size);
|
||||||
|
else
|
||||||
if (!ret)
|
{
|
||||||
RARCH_ERR("%s \"%s\".\n",
|
RARCH_ERR("%s \"%s\".\n",
|
||||||
msg_hash_to_str(MSG_FAILED_TO_SAVE_STATE_TO),
|
msg_hash_to_str(MSG_FAILED_TO_SAVE_STATE_TO),
|
||||||
path);
|
path);
|
||||||
|
}
|
||||||
|
|
||||||
free(data);
|
free(data);
|
||||||
|
|
||||||
@ -291,7 +292,6 @@ bool load_state(const char *path)
|
|||||||
void load_ram_file(const char *path, int type)
|
void load_ram_file(const char *path, int type)
|
||||||
{
|
{
|
||||||
ssize_t rc;
|
ssize_t rc;
|
||||||
bool ret = false;
|
|
||||||
void *buf = NULL;
|
void *buf = NULL;
|
||||||
size_t size = core.retro_get_memory_size(type);
|
size_t size = core.retro_get_memory_size(type);
|
||||||
void *data = core.retro_get_memory_data(type);
|
void *data = core.retro_get_memory_data(type);
|
||||||
@ -299,9 +299,7 @@ void load_ram_file(const char *path, int type)
|
|||||||
if (size == 0 || !data)
|
if (size == 0 || !data)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ret = read_file(path, &buf, &rc);
|
if (!read_file(path, &buf, &rc))
|
||||||
|
|
||||||
if (!ret)
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (rc > 0)
|
if (rc > 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user