mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
utils: Implement helper to get current module config path
This commit is contained in:
parent
305afd763d
commit
a589e80bdb
@ -227,6 +227,7 @@ namespace Utils {
|
||||
namespace Obs {
|
||||
namespace StringHelper {
|
||||
std::string GetObsVersion();
|
||||
std::string GetModuleConfigPath(std::string &fileName);
|
||||
std::string GetCurrentSceneCollection();
|
||||
std::string GetCurrentProfile();
|
||||
std::string GetCurrentProfilePath();
|
||||
|
@ -20,6 +20,8 @@ with this program. If not, see <https://www.gnu.org/licenses/>
|
||||
#include <inttypes.h>
|
||||
#include <QString>
|
||||
|
||||
#include <obs-module.h>
|
||||
|
||||
#include <util/util.hpp>
|
||||
|
||||
#include "Obs.h"
|
||||
@ -42,6 +44,13 @@ std::string Utils::Obs::StringHelper::GetObsVersion()
|
||||
return combined.toStdString();
|
||||
}
|
||||
|
||||
std::string Utils::Obs::StringHelper::GetModuleConfigPath(std::string &fileName)
|
||||
{
|
||||
BPtr<char> configPath = obs_module_config_path(fileName.c_str());
|
||||
std::string ret = configPath.Get();
|
||||
return ret;
|
||||
}
|
||||
|
||||
std::string Utils::Obs::StringHelper::GetCurrentSceneCollection()
|
||||
{
|
||||
BPtr<char> sceneCollectionName = obs_frontend_get_current_scene_collection();
|
||||
|
Loading…
Reference in New Issue
Block a user