diff --git a/libobs/obs-module.c b/libobs/obs-module.c index 6d43b4504..144aea755 100644 --- a/libobs/obs-module.c +++ b/libobs/obs-module.c @@ -78,8 +78,8 @@ complete: static void module_load_ui_exports(struct obs_module *mod) { - bool (*enum_func)(size_t idx, struct obs_ui_info *info); - struct obs_ui_info ui_info; + bool (*enum_func)(size_t idx, const struct obs_ui_info **info); + const struct obs_ui_info *ui_info; size_t i = 0; enum_func = os_dlsym(mod->module, "enum_ui"); @@ -90,13 +90,13 @@ static void module_load_ui_exports(struct obs_module *mod) struct ui_callback callback; struct dstr name; - dstr_init_copy(&name, ui_info.name); + dstr_init_copy(&name, ui_info->name); dstr_cat(&name, "_"); - dstr_cat(&name, ui_info.task); + dstr_cat(&name, ui_info->task); dstr_cat(&name, "_"); - dstr_cat(&name, ui_info.target); + dstr_cat(&name, ui_info->target); - callback.ui_info = ui_info; + callback.ui_info = *ui_info; callback.callback = os_dlsym(mod->module, name.array); if (!callback.callback) { diff --git a/libobs/obs-ui.h b/libobs/obs-ui.h index a70dda930..e820e44f7 100644 --- a/libobs/obs-ui.h +++ b/libobs/obs-ui.h @@ -67,9 +67,10 @@ struct obs_ui_info { * =========================================== * Primary Exports * =========================================== - * bool enum_ui(size_t idx, struct obs_ui_info *ui_info); - * idx: index of the enumeration - * export: full name of the actual UI export. + * bool enum_ui(size_t idx, const struct obs_ui_info **ui_info); + * + * idx: index of the enumeration + * ui_info: pointer to the ui data for this enumeration * Return value: false when no more available. * * =========================================== @@ -121,7 +122,7 @@ struct obs_ui_info { * task: Task of the user interface (i.e. "config", "config_panel") * target: Desired target (i.e. "qt", "wx", "gtk3", "win32", etc) * data: Pointer to the obs input/output/etc - * parent: Parent pointer for UI toolkit (if any) + * ui_data: UI-specific data, usually a parent pointer/handle (if any) * * Return value: OBS_UI_SUCCESS if the UI was successful * OBS_UI_CANCEL if the UI was cancelled by the user