Skip to content
Snippets Groups Projects
Commit 895ad807 authored by BtbN's avatar BtbN Committed by Jim
Browse files

Add api to get module data and binary paths

parent de4e4f7b
No related branches found
No related tags found
No related merge requests found
...@@ -126,6 +126,16 @@ const char *obs_get_module_description(obs_module_t module) ...@@ -126,6 +126,16 @@ const char *obs_get_module_description(obs_module_t module)
return (module && module->description) ? module->description() : NULL; return (module && module->description) ? module->description() : NULL;
} }
const char *obs_get_module_binary_path(obs_module_t module)
{
return module ? module->bin_path : NULL;
}
const char *obs_get_module_data_path(obs_module_t module)
{
return module ? module->data_path : NULL;
}
char *obs_find_module_file(obs_module_t module, const char *file) char *obs_find_module_file(obs_module_t module, const char *file)
{ {
struct dstr output = {0}; struct dstr output = {0};
......
...@@ -301,6 +301,12 @@ EXPORT const char *obs_get_module_author(obs_module_t module); ...@@ -301,6 +301,12 @@ EXPORT const char *obs_get_module_author(obs_module_t module);
/** Returns the module description */ /** Returns the module description */
EXPORT const char *obs_get_module_description(obs_module_t module); EXPORT const char *obs_get_module_description(obs_module_t module);
/** Returns the module binary path */
EXPORT const char *obs_get_module_binary_path(obs_module_t module);
/** Returns the module data path */
EXPORT const char *obs_get_module_data_path(obs_module_t module);
/** /**
* Adds a module search path to be used with obs_find_modules. If the search * Adds a module search path to be used with obs_find_modules. If the search
* path strings contain %module%, that text will be replaced with the module * path strings contain %module%, that text will be replaced with the module
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment