Skip to content

Commit

Permalink
reenable rewind if the user disables netplay
Browse files Browse the repository at this point in the history
  • Loading branch information
radius committed Jul 25, 2017
1 parent c101b4c commit c288216
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 3 additions & 1 deletion command.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 6 additions & 0 deletions menu/cbs/menu_cbs_ok.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c288216

Please sign in to comment.