1
0
mirror of https://github.com/libretro/RetroArch synced 2024-07-08 20:25:47 +00:00

Add Start Streaming / Start Recording - implementation will need

to be properly done though
This commit is contained in:
twinaphex 2018-09-17 09:18:44 +02:00
parent 3c8ee6f26a
commit c40700e51b
4 changed files with 70 additions and 8 deletions

View File

@ -2681,6 +2681,7 @@ 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
@ -2692,6 +2693,7 @@ static int action_ok_start_recording(const char *path,
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
@ -2700,6 +2702,22 @@ static int action_ok_start_streaming(const char *path,
return 0;
}
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;
}
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;
}
static int action_ok_cheat_add_top(const char *path,
const char *label, unsigned type, size_t idx, size_t entry_idx)
{
@ -4632,6 +4650,12 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
case MENU_ENUM_LABEL_QUICK_MENU_START_STREAMING:
BIND_ACTION_OK(cbs, action_ok_start_streaming);
break;
case MENU_ENUM_LABEL_QUICK_MENU_STOP_RECORDING:
BIND_ACTION_OK(cbs, action_ok_stop_recording);
break;
case MENU_ENUM_LABEL_QUICK_MENU_STOP_STREAMING:
BIND_ACTION_OK(cbs, action_ok_stop_streaming);
break;
case MENU_ENUM_LABEL_CHEAT_START_OR_CONT:
BIND_ACTION_OK(cbs, action_ok_cheat_start_or_cont);
break;

View File

@ -67,6 +67,10 @@ default_sublabel_macro(menu_action_sublabel_setting_audio_mixer_stream_remove,
default_sublabel_macro(menu_action_sublabel_setting_audio_mixer_stream_volume,
MENU_ENUM_SUBLABEL_MIXER_ACTION_VOLUME)
default_sublabel_macro(action_bind_sublabel_quick_menu_override_options, MENU_ENUM_SUBLABEL_QUICK_MENU_OVERRIDE_OPTIONS)
default_sublabel_macro(action_bind_sublabel_quick_menu_start_streaming, MENU_ENUM_SUBLABEL_QUICK_MENU_START_STREAMING)
default_sublabel_macro(action_bind_sublabel_quick_menu_start_recording, MENU_ENUM_SUBLABEL_QUICK_MENU_START_RECORDING)
default_sublabel_macro(action_bind_sublabel_quick_menu_stop_streaming, MENU_ENUM_SUBLABEL_QUICK_MENU_STOP_STREAMING)
default_sublabel_macro(action_bind_sublabel_quick_menu_stop_recording, MENU_ENUM_SUBLABEL_QUICK_MENU_STOP_RECORDING)
default_sublabel_macro(action_bind_sublabel_crt_switchres, MENU_ENUM_SUBLABEL_CRT_SWITCH_RESOLUTION)
default_sublabel_macro(action_bind_sublabel_crt_switchres_super, MENU_ENUM_SUBLABEL_CRT_SWITCH_RESOLUTION_SUPER)
default_sublabel_macro(action_bind_sublabel_crt_switchres_x_axis_centering, MENU_ENUM_SUBLABEL_CRT_SWITCH_X_AXIS_CENTERING)
@ -737,6 +741,18 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
case MENU_ENUM_LABEL_ADD_TO_MIXER_AND_COLLECTION_AND_PLAY:
BIND_ACTION_SUBLABEL(cbs, menu_action_sublabel_setting_audio_mixer_add_to_mixer_and_play);
break;
case MENU_ENUM_LABEL_QUICK_MENU_START_STREAMING:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_quick_menu_start_streaming);
break;
case MENU_ENUM_LABEL_QUICK_MENU_START_RECORDING:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_quick_menu_start_recording);
break;
case MENU_ENUM_LABEL_QUICK_MENU_STOP_STREAMING:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_quick_menu_stop_streaming);
break;
case MENU_ENUM_LABEL_QUICK_MENU_STOP_RECORDING:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_quick_menu_stop_recording);
break;
case MENU_ENUM_LABEL_QUICK_MENU_OVERRIDE_OPTIONS:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_quick_menu_override_options);
break;

View File

@ -68,6 +68,7 @@
#include "../managers/cheat_manager.h"
#include "../managers/core_option_manager.h"
#include "../paths.h"
#include "../record/record_driver.h"
#include "../retroarch.h"
#include "../core.h"
#include "../frontend/frontend_driver.h"
@ -2654,15 +2655,32 @@ static int menu_displaylist_parse_load_content_settings(
MENU_ENUM_LABEL_ADD_TO_FAVORITES, FILE_TYPE_PLAYLIST_ENTRY, 0, 0);
}
menu_entries_append_enum(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QUICK_MENU_START_RECORDING),
msg_hash_to_str(MENU_ENUM_LABEL_QUICK_MENU_START_RECORDING),
MENU_ENUM_LABEL_QUICK_MENU_START_RECORDING, MENU_SETTING_ACTION, 0, 0);
if (!recording_is_enabled())
{
menu_entries_append_enum(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QUICK_MENU_START_RECORDING),
msg_hash_to_str(MENU_ENUM_LABEL_QUICK_MENU_START_RECORDING),
MENU_ENUM_LABEL_QUICK_MENU_START_RECORDING, MENU_SETTING_ACTION, 0, 0);
menu_entries_append_enum(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QUICK_MENU_START_STREAMING),
msg_hash_to_str(MENU_ENUM_LABEL_QUICK_MENU_START_STREAMING),
MENU_ENUM_LABEL_QUICK_MENU_START_STREAMING, MENU_SETTING_ACTION, 0, 0);
menu_entries_append_enum(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QUICK_MENU_START_STREAMING),
msg_hash_to_str(MENU_ENUM_LABEL_QUICK_MENU_START_STREAMING),
MENU_ENUM_LABEL_QUICK_MENU_START_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);
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);
}
if (settings->bools.quick_menu_show_options && !settings->bools.kiosk_mode_enable)
{

View File

@ -180,6 +180,10 @@ unsigned *recording_driver_get_height(void);
void recording_driver_free_state(void);
bool recording_is_enabled(void);
bool streaming_is_enabled(void);
extern void *recording_data;
RETRO_END_DECLS