mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
(retroarch.c) Some refactors
This commit is contained in:
parent
96d2e1e88f
commit
163b802449
16
retroarch.c
16
retroarch.c
@ -1909,7 +1909,7 @@ static void save_auto_state(void)
|
||||
|
||||
void rarch_load_state(void)
|
||||
{
|
||||
char load_path[PATH_MAX];
|
||||
char load_path[PATH_MAX], msg[512];
|
||||
|
||||
if (g_extern.state_slot > 0)
|
||||
snprintf(load_path, sizeof(load_path), "%s%d", g_extern.savestate_name, g_extern.state_slot);
|
||||
@ -1918,10 +1918,7 @@ void rarch_load_state(void)
|
||||
else
|
||||
snprintf(load_path, sizeof(load_path), "%s", g_extern.savestate_name);
|
||||
|
||||
size_t size = pretro_serialize_size();
|
||||
char msg[512];
|
||||
|
||||
if (size)
|
||||
if (pretro_serialize_size())
|
||||
{
|
||||
if (load_state(load_path))
|
||||
{
|
||||
@ -1943,11 +1940,11 @@ void rarch_load_state(void)
|
||||
|
||||
void rarch_save_state(void)
|
||||
{
|
||||
char save_path[PATH_MAX], msg[512];
|
||||
|
||||
if (g_settings.savestate_auto_index)
|
||||
g_extern.state_slot++;
|
||||
|
||||
char save_path[PATH_MAX];
|
||||
|
||||
if (g_extern.state_slot > 0)
|
||||
snprintf(save_path, sizeof(save_path), "%s%d", g_extern.savestate_name, g_extern.state_slot);
|
||||
else if (g_extern.state_slot < 0)
|
||||
@ -1955,10 +1952,7 @@ void rarch_save_state(void)
|
||||
else
|
||||
snprintf(save_path, sizeof(save_path), "%s", g_extern.savestate_name);
|
||||
|
||||
size_t size = pretro_serialize_size();
|
||||
char msg[512];
|
||||
|
||||
if (size)
|
||||
if (pretro_serialize_size())
|
||||
{
|
||||
if (save_state(save_path))
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user