fix these two

This commit is contained in:
radius 2018-10-13 16:06:43 -05:00
parent e1227b2d68
commit 8c9e6a7c4e
4 changed files with 25 additions and 13 deletions

View File

@ -1341,6 +1341,9 @@ static int menu_cbs_init_bind_deferred_push_compare_label(
case MENU_LABEL_RECORD_CONFIG: case MENU_LABEL_RECORD_CONFIG:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_record_configfile); BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_record_configfile);
break; break;
case MENU_LABEL_STREAM_CONFIG:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_stream_configfile);
break;
case MENU_LABEL_NETPLAY: case MENU_LABEL_NETPLAY:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_netplay); BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_netplay);
break; break;

View File

@ -477,12 +477,14 @@ int generic_action_ok_displaylist_push(const char *path,
dl_type = DISPLAYLIST_FILE_BROWSER_SELECT_FILE; dl_type = DISPLAYLIST_FILE_BROWSER_SELECT_FILE;
break; break;
case ACTION_OK_DL_STREAM_CONFIGFILE: case ACTION_OK_DL_STREAM_CONFIGFILE:
filebrowser_clear_type(); {
info.type = type; global_t *global = global_get_ptr();
info.directory_ptr = idx; info.type = type;
info_path = settings->paths.path_stream_config; info.directory_ptr = idx;
info_label = label; info_path = global->record.config_dir;
dl_type = DISPLAYLIST_FILE_BROWSER_SELECT_FILE; info_label = label;
dl_type = DISPLAYLIST_FILE_BROWSER_SELECT_FILE;
}
break; break;
case ACTION_OK_DL_RECORD_CONFIGFILE: case ACTION_OK_DL_RECORD_CONFIGFILE:
filebrowser_clear_type(); filebrowser_clear_type();
@ -1302,20 +1304,22 @@ static int generic_action_ok(const char *path,
break; break;
case ACTION_OK_LOAD_STREAM_CONFIGFILE: case ACTION_OK_LOAD_STREAM_CONFIGFILE:
{ {
settings_t *settings = config_get_ptr(); settings_t *settings = config_get_ptr();
flush_char = msg_hash_to_str(flush_id); flush_char = msg_hash_to_str(flush_id);
strlcpy(settings->paths.path_stream_config, action_path,
sizeof(settings->paths.path_stream_config)); if (settings)
strlcpy(settings->paths.path_stream_config, action_path,
sizeof(settings->paths.path_stream_config));
} }
break; break;
case ACTION_OK_LOAD_RECORD_CONFIGFILE: case ACTION_OK_LOAD_RECORD_CONFIGFILE:
{ {
global_t *global = global_get_ptr(); settings_t *settings = config_get_ptr();
flush_char = msg_hash_to_str(flush_id); flush_char = msg_hash_to_str(flush_id);
if (global) if (settings)
strlcpy(global->record.config, action_path, strlcpy(settings->paths.path_record_config, action_path,
sizeof(global->record.config)); sizeof(settings->paths.path_record_config));
} }
break; break;
case ACTION_OK_LOAD_REMAPPING_FILE: case ACTION_OK_LOAD_REMAPPING_FILE:
@ -5288,6 +5292,9 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
case MENU_LABEL_RECORD_CONFIG: case MENU_LABEL_RECORD_CONFIG:
BIND_ACTION_OK(cbs, action_ok_record_configfile); BIND_ACTION_OK(cbs, action_ok_record_configfile);
break; break;
case MENU_LABEL_STREAM_CONFIG:
BIND_ACTION_OK(cbs, action_ok_stream_configfile);
break;
#ifdef HAVE_NETWORKING #ifdef HAVE_NETWORKING
case MENU_LABEL_UPDATE_LAKKA: case MENU_LABEL_UPDATE_LAKKA:
BIND_ACTION_OK(cbs, action_ok_lakka_list); BIND_ACTION_OK(cbs, action_ok_lakka_list);

View File

@ -2254,6 +2254,7 @@ enum msg_hash_enums
/* Record settings */ /* Record settings */
#define MENU_LABEL_RECORD_CONFIG 0x11c3daf9U #define MENU_LABEL_RECORD_CONFIG 0x11c3daf9U
#define MENU_LABEL_STREAM_CONFIG 0x79774b86U
/* Cheat options */ /* Cheat options */

View File

@ -944,6 +944,7 @@ static void *ffmpeg_new(const struct record_params *params)
if (params->preset == RECORD_CONFIG_TYPE_RECORDING_CUSTOM || params->preset == RECORD_CONFIG_TYPE_STREAMING_CUSTOM) if (params->preset == RECORD_CONFIG_TYPE_RECORDING_CUSTOM || params->preset == RECORD_CONFIG_TYPE_STREAMING_CUSTOM)
{ {
RARCH_LOG("config: %s %s\n", &handle->config, params->config);
if (!ffmpeg_init_config(&handle->config, params->config)) if (!ffmpeg_init_config(&handle->config, params->config))
goto error; goto error;
} }