mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-09-30 13:30:28 -05:00
Enable use of obs-module-helper.hpp in tests
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
#include "obs-module-helper.hpp"
|
||||
#ifndef UNIT_TEST
|
||||
#include "switcher-data.hpp"
|
||||
#endif
|
||||
|
||||
#ifndef UNIT_TEST
|
||||
const char *obs_module_text(const char *text)
|
||||
{
|
||||
if (!advss::switcher) {
|
||||
@@ -16,3 +19,15 @@ obs_module_t *obs_current_module()
|
||||
}
|
||||
return advss::switcher->GetModule();
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
const char *obs_module_text(const char *text)
|
||||
{
|
||||
return text;
|
||||
};
|
||||
obs_module_t *obs_current_module()
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
#pragma once
|
||||
#ifndef UNIT_TEST
|
||||
#include <obs-module.h>
|
||||
#else
|
||||
typedef struct obs_module obs_module_t;
|
||||
#endif
|
||||
|
||||
const char *obs_module_text(const char *text);
|
||||
obs_module_t *obs_current_module();
|
||||
|
||||
Reference in New Issue
Block a user