[recording] handle failure to start recording properly

This commit is contained in:
radius 2018-09-18 00:04:18 -05:00
parent a0cab184db
commit 6351e80946
2 changed files with 5 additions and 2 deletions

View File

@ -2179,7 +2179,12 @@ TODO: Add a setting for these tweaks */
command_event(CMD_EVENT_RECORD_DEINIT, NULL); command_event(CMD_EVENT_RECORD_DEINIT, NULL);
recording_set_state(true); recording_set_state(true);
if (!recording_init()) if (!recording_init())
{
command_event(CMD_EVENT_RECORD_DEINIT, NULL);
recording_set_state(false);
streaming_set_state(false);
return false; return false;
}
} }
break; break;
case CMD_EVENT_HISTORY_DEINIT: case CMD_EVENT_HISTORY_DEINIT:

View File

@ -356,8 +356,6 @@ bool recording_init()
(float)av_info->timing.fps, (float)av_info->timing.fps,
(float)av_info->timing.sample_rate); (float)av_info->timing.sample_rate);
RARCH_LOG("STREAM!!! %d\n", streaming_is_enabled());
if (!string_is_empty(global->record.path)) if (!string_is_empty(global->record.path))
strlcpy(output, global->record.path, sizeof(output)); strlcpy(output, global->record.path, sizeof(output));
else else