gfx/blur: Fix unicode support

Related: #359
This commit is contained in:
Michael Fabian 'Xaymar' Dirks 2020-11-28 23:31:42 +01:00
parent 71a969c30f
commit 55ad82aac0
5 changed files with 5 additions and 20 deletions

View file

@ -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("<gfx::blur::box_linear> Failed to load _effect.");
}

View file

@ -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("<gfx::blur::box> Failed to load _effect.");
}

View file

@ -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("<gfx::blur::box_linear> Failed to load _effect.");
}

View file

@ -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++) {

View file

@ -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++) {