mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-20 10:09:15 +00:00
libobs: Add OBSContext class to obs.hpp
This is just a data-less class that simply calls obs_startup/obs_shutdown automatically.
This commit is contained in:
parent
ec69bcb15e
commit
df2242b6aa
|
@ -270,3 +270,17 @@ public:
|
|||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
class OBSContext {
|
||||
public:
|
||||
inline OBSContext() {}
|
||||
inline OBSContext(const char *locale)
|
||||
{
|
||||
obs_startup(locale);
|
||||
}
|
||||
|
||||
inline ~OBSContext()
|
||||
{
|
||||
obs_shutdown();
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue