提交 b4928a62 编写于 作者: P Palana

mac-avcapture: Move preset properties initialization

上级 4d9bd718
......@@ -790,6 +790,20 @@ static bool properties_preset_changed(obs_properties_t *, obs_property_t *p,
return preset_list_changed || autoselect_changed;
}
static void add_preset_properties(obs_properties_t *props)
{
obs_property_t *preset_list = obs_properties_add_list(props, "preset",
TEXT_PRESET, OBS_COMBO_TYPE_LIST,
OBS_COMBO_FORMAT_STRING);
for (NSString *preset in presets())
obs_property_list_add_string(preset_list,
preset_names(preset).UTF8String,
preset.UTF8String);
obs_property_set_modified_callback(preset_list,
properties_preset_changed);
}
static obs_properties_t *av_capture_properties(void*)
{
obs_properties_t *props = obs_properties_create();
......@@ -813,16 +827,7 @@ static obs_properties_t *av_capture_properties(void*)
// TODO: implement manual configuration
obs_property_set_enabled(use_preset, false);
obs_property_t *preset_list = obs_properties_add_list(props, "preset",
TEXT_PRESET, OBS_COMBO_TYPE_LIST,
OBS_COMBO_FORMAT_STRING);
for (NSString *preset in presets())
obs_property_list_add_string(preset_list,
preset_names(preset).UTF8String,
preset.UTF8String);
obs_property_set_modified_callback(preset_list,
properties_preset_changed);
add_preset_properties(props);
obs_properties_add_bool(props, "buffering",
obs_module_text("Buffering"));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册