Просмотр исходного кода

libobs: Add OBSContext class to obs.hpp

This is just a data-less class that simply calls
obs_startup/obs_shutdown automatically.
jp9000 10 лет назад
Родитель
Сommit
df2242b6aa
1 измененных файлов с 14 добавлено и 0 удалено
  1. 14 0
      libobs/obs.hpp

+ 14 - 0
libobs/obs.hpp

@@ -270,3 +270,17 @@ public:
 		return *this;
 		return *this;
 	}
 	}
 };
 };
+
+class OBSContext {
+public:
+	inline OBSContext() {}
+	inline OBSContext(const char *locale)
+	{
+		obs_startup(locale);
+	}
+
+	inline ~OBSContext()
+	{
+		obs_shutdown();
+	}
+};