提交 e423492d 编写于 作者: J jp9000

libobs: Add API function to get version string

Some plugins are using the OBS_VERSION macro obs-config.h to specify the
current version, which will bake the string in to the plugin, making it
so that if the plugin is not replaced for a patch, it could potentially
have the incorrect version.  This makes it so that a plugin/frontend can
get the current version string that's baked in to libobs itself.
上级 8b68ccdc
......@@ -884,6 +884,11 @@ uint32_t obs_get_version(void)
return LIBOBS_API_VER;
}
const char *obs_get_version_string(void)
{
return OBS_VERSION;
}
void obs_set_locale(const char *locale)
{
struct obs_module *module;
......
......@@ -260,6 +260,9 @@ EXPORT bool obs_initialized(void);
/** @return The current core version */
EXPORT uint32_t obs_get_version(void);
/** @return The current core version string */
EXPORT const char *obs_get_version_string(void);
/**
* Sets a new locale to use for modules. This will call obs_module_set_locale
* for each module with the new locale.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册