File: obs-module-helper.cpp

package info (click to toggle)
obs-advanced-scene-switcher 1.32.8-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 43,492 kB
  • sloc: xml: 297,593; cpp: 147,875; python: 387; sh: 280; ansic: 170; makefile: 33
file content (37 lines) | stat: -rw-r--r-- 588 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#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) {
		assert(false);
		return "obs_module_text called too early";
	}
	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