SceneSwitcher/lib/utils/obs-module-helper.cpp
WarmUpTill 7d0332dd0e Restructure library and plugins
The "core" macro conditions and actions have been extracted out to the
"base" plugin.

The library now mostly contains functionality which is required across
all plugins and (e.g. definitions for macro segments).

The goal is to reduce the complexity and cross-dependencies and group
the source files in a better way.

This should relsove the "library limit of 65535 objects exceeded" build
issue occuring in some Windows build environments.
2024-01-27 14:10:34 +01:00

37 lines
539 B
C++

#include "obs-module-helper.hpp"
#ifndef UNIT_TEST
#include "switcher-data.hpp"
#endif
namespace advss {
#ifndef UNIT_TEST
const char *obs_module_text(const char *text)
{
if (!advss::switcher) {
return "";
}
return advss::switcher->Translate(text);
}
obs_module_t *obs_current_module()
{
if (!advss::switcher) {
return nullptr;
}
return advss::switcher->GetModule();
}
#else
const char *obs_module_text(const char *text)
{
return text;
};
obs_module_t *obs_current_module()
{
return nullptr;
}
#endif
} // namespace advss