From 895ad807591f7fc688149b67ff3346d85b5fec4e Mon Sep 17 00:00:00 2001 From: BtbN <btbn@btbn.de> Date: Sun, 31 Aug 2014 16:44:43 +0200 Subject: [PATCH] Add api to get module data and binary paths --- libobs/obs-module.c | 10 ++++++++++ libobs/obs.h | 6 ++++++ 2 files changed, 16 insertions(+) diff --git a/libobs/obs-module.c b/libobs/obs-module.c index a9ac5d0d4..73b547fcd 100644 --- a/libobs/obs-module.c +++ b/libobs/obs-module.c @@ -126,6 +126,16 @@ const char *obs_get_module_description(obs_module_t module) 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) { struct dstr output = {0}; diff --git a/libobs/obs.h b/libobs/obs.h index 78c39800a..e54f5a059 100644 --- a/libobs/obs.h +++ b/libobs/obs.h @@ -301,6 +301,12 @@ EXPORT const char *obs_get_module_author(obs_module_t module); /** Returns the module description */ 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 * path strings contain %module%, that text will be replaced with the module -- GitLab