mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-11-14 07:45:06 +00:00
parent
576606c712
commit
e2d342818a
1 changed files with 6 additions and 12 deletions
|
@ -81,18 +81,12 @@ color_grade_instance::~color_grade_instance() {}
|
||||||
color_grade_instance::color_grade_instance(obs_data_t* data, obs_source_t* self) : obs::source_instance(data, self)
|
color_grade_instance::color_grade_instance(obs_data_t* data, obs_source_t* self) : obs::source_instance(data, self)
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
char* file = obs_module_file("effects/color-grade.effect");
|
auto file = streamfx::data_file_path("effects/color-grade.effect").u8string();
|
||||||
if (file) {
|
|
||||||
try {
|
try {
|
||||||
_effect = gs::effect::create(file);
|
_effect = gs::effect::create(file);
|
||||||
bfree(file);
|
|
||||||
} catch (std::runtime_error& ex) {
|
} catch (std::runtime_error& ex) {
|
||||||
DLOG_ERROR("<filter-color-grade> Loading _effect '%s' failed with error(s): %s", file, ex.what());
|
DLOG_ERROR("<filter-color-grade> Loading effect '%s' failed with error(s): %s", file.c_str(), ex.what());
|
||||||
bfree(file);
|
throw;
|
||||||
throw ex;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
throw std::runtime_error("Missing file color-grade.effect.");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue