Merge pull request #7231 from fr500/master

[recording] hook up the options properly
This commit is contained in:
Twinaphex 2018-09-17 19:37:01 +02:00 committed by GitHub
commit 448520ead2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 24 additions and 25 deletions

View File

@ -2170,7 +2170,6 @@ TODO: Add a setting for these tweaks */
break;
case CMD_EVENT_RECORD_DEINIT:
{
recording_set_state(false);
if (!recording_deinit())
return false;
}

View File

@ -71,6 +71,8 @@
#include "../cheevos/cheevos.h"
#endif
#include "record/record_driver.h"
enum
{
ACTION_OK_LOAD_PRESET = 0,
@ -2681,41 +2683,35 @@ static int action_ok_cheat_reload_cheats(const char *path,
static int action_ok_start_recording(const char *path,
const char *label, unsigned type, size_t idx, size_t entry_idx)
{
/* TODO/FIXME */
#if 0
streaming_set_status(false);
#endif
streaming_set_state(false);
command_event(CMD_EVENT_RECORD_INIT, NULL);
return 0;
return generic_action_ok_command(CMD_EVENT_RESUME);
}
static int action_ok_start_streaming(const char *path,
const char *label, unsigned type, size_t idx, size_t entry_idx)
{
/* TODO/FIXME */
#if 0
streaming_set_status(true);
#endif
streaming_set_state(true);
command_event(CMD_EVENT_RECORD_INIT, NULL);
return 0;
return generic_action_ok_command(CMD_EVENT_RESUME);
}
static int action_ok_stop_recording(const char *path,
const char *label, unsigned type, size_t idx, size_t entry_idx)
{
/* TODO/FIXME */
return 0;
recording_set_state(false);
streaming_set_state(false);
command_event(CMD_EVENT_RECORD_DEINIT, NULL);
return generic_action_ok_command(CMD_EVENT_RESUME);
}
static int action_ok_stop_streaming(const char *path,
const char *label, unsigned type, size_t idx, size_t entry_idx)
{
/* TODO/FIXME */
return 0;
recording_set_state(false);
streaming_set_state(false);
command_event(CMD_EVENT_RECORD_DEINIT, NULL);
return generic_action_ok_command(CMD_EVENT_RESUME);
}
static int action_ok_cheat_add_top(const char *path,

View File

@ -2669,16 +2669,16 @@ static int menu_displaylist_parse_load_content_settings(
}
else
{
menu_entries_append_enum(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QUICK_MENU_STOP_RECORDING),
msg_hash_to_str(MENU_ENUM_LABEL_QUICK_MENU_STOP_RECORDING),
MENU_ENUM_LABEL_QUICK_MENU_STOP_RECORDING, MENU_SETTING_ACTION, 0, 0);
if (!streaming_is_enabled())
if (streaming_is_enabled())
menu_entries_append_enum(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QUICK_MENU_STOP_STREAMING),
msg_hash_to_str(MENU_ENUM_LABEL_QUICK_MENU_STOP_STREAMING),
MENU_ENUM_LABEL_QUICK_MENU_STOP_STREAMING, MENU_SETTING_ACTION, 0, 0);
else
menu_entries_append_enum(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QUICK_MENU_STOP_RECORDING),
msg_hash_to_str(MENU_ENUM_LABEL_QUICK_MENU_STOP_RECORDING),
MENU_ENUM_LABEL_QUICK_MENU_STOP_RECORDING, MENU_SETTING_ACTION, 0, 0);
}

View File

@ -356,6 +356,8 @@ 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

View File

@ -164,6 +164,8 @@ bool recording_is_enabled(void);
void recording_set_state(bool state);
void streaming_set_state(bool state);
void recording_push_audio(const int16_t *data, size_t samples);
void *recording_driver_get_data_ptr(void);