From 841819655743f79d98a55edaaf3915cb45434bcd Mon Sep 17 00:00:00 2001 From: Gregor Richards Date: Tue, 4 Oct 2016 13:44:35 -0400 Subject: [PATCH] Make core_unserialize universally inform Netplay --- core_impl.c | 5 +++++ tasks/task_save.c | 12 ------------ 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/core_impl.c b/core_impl.c index c967db2017..683a821c57 100644 --- a/core_impl.c +++ b/core_impl.c @@ -283,6 +283,11 @@ bool core_unserialize(retro_ctx_serialize_info_t *info) return false; if (!core.retro_unserialize(info->data_const, info->size)) return false; + +#if HAVE_NETWORKING + netplay_driver_ctl(RARCH_NETPLAY_CTL_LOAD_SAVESTATE, info); +#endif + return true; } diff --git a/tasks/task_save.c b/tasks/task_save.c index 1fad0bc0f9..d554d04fa0 100644 --- a/tasks/task_save.c +++ b/tasks/task_save.c @@ -440,12 +440,6 @@ bool content_undo_load_state(void) ret = core_unserialize(&serial_info); -#if HAVE_NETWORKING - /* If Netplay is running, inform it */ - if (netplay_driver_ctl(RARCH_NETPLAY_CTL_IS_DATA_INITED, NULL)) - netplay_driver_ctl(RARCH_NETPLAY_CTL_LOAD_SAVESTATE, &serial_info); -#endif - /* Clean up the temporary copy */ free(temp_data); temp_data = NULL; @@ -902,12 +896,6 @@ static void content_load_state_cb(void *task_data, ret = core_unserialize(&serial_info); -#if HAVE_NETWORKING - /* If Netplay is running, inform it */ - if (netplay_driver_ctl(RARCH_NETPLAY_CTL_IS_DATA_INITED, NULL)) - netplay_driver_ctl(RARCH_NETPLAY_CTL_LOAD_SAVESTATE, &serial_info); -#endif - /* Flush back. */ for (i = 0; i < num_blocks; i++) {