Merge pull request #7241 from fr500/master

[recording] handle failure to start recording properly
This commit is contained in:
Twinaphex 2018-09-18 07:21:18 +02:00 committed by GitHub
commit 2aed5a34ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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);
recording_set_state(true);
if (!recording_init())
{
command_event(CMD_EVENT_RECORD_DEINIT, NULL);
recording_set_state(false);
streaming_set_state(false);
return false;
}
}
break;
case CMD_EVENT_HISTORY_DEINIT:

View File

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