reenable rewind if the user disables netplay

This commit is contained in:
radius 2017-07-10 21:51:56 -05:00
parent c101b4ccb3
commit c2882164f9
2 changed files with 9 additions and 1 deletions

View File

@ -1856,10 +1856,12 @@ bool command_event(enum event_command cmd, void *data)
if (settings->bools.cheevos_hardcore_mode_enable)
return false;
#endif
#ifdef HAVE_NETWORKING
/* Only enable state manager if netplay is not underway
TODO: Add a setting for these tweaks */
if (settings->bools.rewind_enable
if (settings->bools.rewind_enable
&& !netplay_driver_ctl(RARCH_NETPLAY_CTL_IS_ENABLED, NULL))
#endif
state_manager_event_init((unsigned)settings->rewind_buffer_size);
}
break;

View File

@ -4373,9 +4373,15 @@ static int action_ok_netplay_enable_client(const char *path,
static int action_ok_netplay_disconnect(const char *path,
const char *label, unsigned type, size_t idx, size_t entry_idx)
{
settings_t *settings = config_get_ptr();
#ifdef HAVE_NETWORKING
netplay_driver_ctl(RARCH_NETPLAY_CTL_DISCONNECT, NULL);
netplay_driver_ctl(RARCH_NETPLAY_CTL_DISABLE, NULL);
/* Re-enable rewind if it was enabled
TODO: Add a setting for these tweaks */
if (settings->bools.rewind_enable)
command_event(CMD_EVENT_REWIND_INIT, NULL);
return generic_action_ok_command(CMD_EVENT_RESUME);
#else