From 15472eb184b31d3768639789f3c47fe4063ae7eb Mon Sep 17 00:00:00 2001 From: Dwedit Date: Sat, 31 Mar 2018 00:32:41 -0500 Subject: [PATCH 1/2] Stop savestate transmission in netplay --- runahead/run_ahead.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/runahead/run_ahead.c b/runahead/run_ahead.c index 74551b8a1b..5c4305bd54 100644 --- a/runahead/run_ahead.c +++ b/runahead/run_ahead.c @@ -354,7 +354,9 @@ static bool runahead_load_state(void) bool lastDirty = input_is_dirty; bool okay; set_fast_savestate(); - okay = core_unserialize(serialize_info); + /* calling core_unserialize has side effects with netplay (it triggers transmitting your save state) + call retro_unserialize directly from the core instead */ + okay = current_core.retro_unserialize(serialize_info->data_const, serialize_info->size); unset_fast_savestate(); input_is_dirty = lastDirty; From 6b77a6629817b5e013ed41a8f19b519352c73902 Mon Sep 17 00:00:00 2001 From: Dwedit Date: Sat, 31 Mar 2018 00:55:37 -0500 Subject: [PATCH 2/2] get rid of the unnecessary typedef --- runahead/run_ahead.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/runahead/run_ahead.c b/runahead/run_ahead.c index 5c4305bd54..f90736abeb 100644 --- a/runahead/run_ahead.c +++ b/runahead/run_ahead.c @@ -96,8 +96,7 @@ static void runahead_save_state_list_rotate(void) static function_t originalRetroDeinit = NULL; static function_t originalRetroUnload = NULL; -typedef struct retro_core_t _retro_core_t; -extern _retro_core_t current_core; +extern struct retro_core_t current_core; extern struct retro_callbacks retro_ctx; static void remove_hooks(void)