diff --git a/source/gfx/blur/gfx-blur-box-linear.cpp b/source/gfx/blur/gfx-blur-box-linear.cpp index 5217dffa..6dd5ce53 100644 --- a/source/gfx/blur/gfx-blur-box-linear.cpp +++ b/source/gfx/blur/gfx-blur-box-linear.cpp @@ -38,9 +38,7 @@ gfx::blur::box_linear_data::box_linear_data() { auto gctx = gs::context(); try { - char* file = obs_module_file("effects/blur/box-linear.effect"); - _effect = gs::effect::create(file); - bfree(file); + _effect = gs::effect::create(streamfx::data_file_path("effects/blur/box-linear.effect").u8string()); } catch (...) { DLOG_ERROR(" Failed to load _effect."); } diff --git a/source/gfx/blur/gfx-blur-box.cpp b/source/gfx/blur/gfx-blur-box.cpp index 41ce8ff6..280d3115 100644 --- a/source/gfx/blur/gfx-blur-box.cpp +++ b/source/gfx/blur/gfx-blur-box.cpp @@ -38,9 +38,7 @@ gfx::blur::box_data::box_data() { auto gctx = gs::context(); try { - char* file = obs_module_file("effects/blur/box.effect"); - _effect = gs::effect::create(file); - bfree(file); + _effect = gs::effect::create(streamfx::data_file_path("effects/blur/box.effect").u8string()); } catch (...) { DLOG_ERROR(" Failed to load _effect."); } diff --git a/source/gfx/blur/gfx-blur-dual-filtering.cpp b/source/gfx/blur/gfx-blur-dual-filtering.cpp index 99f68521..84e17752 100644 --- a/source/gfx/blur/gfx-blur-dual-filtering.cpp +++ b/source/gfx/blur/gfx-blur-dual-filtering.cpp @@ -54,9 +54,7 @@ gfx::blur::dual_filtering_data::dual_filtering_data() { auto gctx = gs::context(); try { - char* file = obs_module_file("effects/blur/dual-filtering.effect"); - _effect = gs::effect::create(file); - bfree(file); + _effect = gs::effect::create(streamfx::data_file_path("effects/blur/dual-filtering.effect").u8string()); } catch (...) { DLOG_ERROR(" Failed to load _effect."); } diff --git a/source/gfx/blur/gfx-blur-gaussian-linear.cpp b/source/gfx/blur/gfx-blur-gaussian-linear.cpp index 2058caea..438bf766 100644 --- a/source/gfx/blur/gfx-blur-gaussian-linear.cpp +++ b/source/gfx/blur/gfx-blur-gaussian-linear.cpp @@ -43,12 +43,7 @@ gfx::blur::gaussian_linear_data::gaussian_linear_data() { auto gctx = gs::context(); - - { - char* file = obs_module_file("effects/blur/gaussian-linear.effect"); - _effect = gs::effect::create(file); - bfree(file); - } + _effect = gs::effect::create(streamfx::data_file_path("effects/blur/gaussian-linear.effect").u8string()); // Precalculate Kernels for (std::size_t kernel_size = 1; kernel_size <= MAX_BLUR_SIZE; kernel_size++) { diff --git a/source/gfx/blur/gfx-blur-gaussian.cpp b/source/gfx/blur/gfx-blur-gaussian.cpp index aa4a65e7..d8a6facd 100644 --- a/source/gfx/blur/gfx-blur-gaussian.cpp +++ b/source/gfx/blur/gfx-blur-gaussian.cpp @@ -44,11 +44,7 @@ gfx::blur::gaussian_data::gaussian_data() { auto gctx = gs::context(); - { - char* file = obs_module_file("effects/blur/gaussian.effect"); - _effect = gs::effect::create(file); - bfree(file); - } + _effect = gs::effect::create(streamfx::data_file_path("effects/blur/gaussian.effect").u8string()); // Precalculate Kernels for (std::size_t kernel_size = 1; kernel_size <= MAX_BLUR_SIZE; kernel_size++) {