mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-11-13 07:15:06 +00:00
parent
54127f6ced
commit
785ffa0b7d
1 changed files with 3 additions and 8 deletions
|
@ -97,18 +97,13 @@ sdf_effects_instance::sdf_effects_instance(obs_data_t* settings, obs_source_t* s
|
||||||
{"effects/sdf/sdf-consumer.effect", _sdf_consumer_effect},
|
{"effects/sdf/sdf-consumer.effect", _sdf_consumer_effect},
|
||||||
};
|
};
|
||||||
for (auto& kv : load_arr) {
|
for (auto& kv : load_arr) {
|
||||||
char* path = obs_module_file(kv.first);
|
auto path = streamfx::data_file_path(kv.first).u8string();
|
||||||
if (!path) {
|
|
||||||
DLOG_ERROR(LOG_PREFIX "Unable to load _effect '%s' as file is missing or locked.", kv.first);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
try {
|
try {
|
||||||
kv.second = gs::effect::create(path);
|
kv.second = gs::effect::create(path);
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
DLOG_ERROR(LOG_PREFIX "Failed to load _effect '%s' (located at '%s') with error(s): %s", kv.first, path,
|
DLOG_ERROR(LOG_PREFIX "Failed to load effect '%s' (located at '%s') with error(s): %s", kv.first,
|
||||||
ex.what());
|
path.c_str(), ex.what());
|
||||||
}
|
}
|
||||||
bfree(path);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue