mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-31 05:35:36 -05:00
Add helper getDataFilePath()
Used to get absolute file path to files in the plugin's data directory
This commit is contained in:
@@ -218,6 +218,17 @@ std::string getSourceSettings(OBSWeakSource ws)
|
||||
return settings;
|
||||
}
|
||||
|
||||
std::filesystem::path getDataFilePath(const std::string &file)
|
||||
{
|
||||
const char *root_path = obs_get_module_data_path(obs_current_module());
|
||||
if (root_path) {
|
||||
auto ret = std::filesystem::u8path(root_path);
|
||||
ret.append(file.data());
|
||||
return ret;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
bool DisplayMessage(const QString &msg, bool question)
|
||||
{
|
||||
if (question) {
|
||||
|
||||
Reference in New Issue
Block a user