Browse Source

Add functions to specify OS module extensions

jp9000 11 years ago
parent
commit
16f2475046
4 changed files with 16 additions and 0 deletions
  1. 5 0
      libobs/obs-cocoa.c
  2. 1 0
      libobs/obs-module.c
  3. 5 0
      libobs/obs-nix.c
  4. 5 0
      libobs/obs-windows.c

+ 5 - 0
libobs/obs-cocoa.c

@@ -26,6 +26,11 @@
 
 #include <objc/objc.h>
 
+const char *get_module_extension(void)
+{
+	return ".so";
+}
+
 // support both foo.so and libfoo.so for now
 static const char *plugin_patterns[] = {
 	OBS_INSTALL_PREFIX "obs-plugins/%s.so",

+ 1 - 0
libobs/obs-module.c

@@ -23,6 +23,7 @@
 #include "obs-module.h"
 
 extern char *find_plugin(const char *plugin);
+extern const char *get_module_extension(void);
 
 static inline int req_func_not_found(const char *name, const char *path)
 {

+ 5 - 0
libobs/obs-nix.c

@@ -24,6 +24,11 @@
 #include "util/dstr.h"
 #include "obs.h"
 
+const char *get_module_extension(void)
+{
+	return ".so";
+}
+
 static inline bool check_path(const char* data, const char *path,
 		struct dstr * output)
 {

+ 5 - 0
libobs/obs-windows.c

@@ -22,6 +22,11 @@
 
 #include <windows.h>
 
+const char *get_module_extension(void)
+{
+	return ".dll";
+}
+
 static inline bool check_path(const char* data, const char *path,
 		struct dstr * output)
 {