mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-12-29 11:01:23 +00:00
filter-displacement: Fix warnings
This commit is contained in:
parent
03e2001137
commit
5b189cb73b
2 changed files with 11 additions and 5 deletions
|
@ -139,9 +139,7 @@ Filter::Displacement::Instance::Instance(obs_data_t *data, obs_source_t *context
|
|||
|
||||
Filter::Displacement::Instance::~Instance() {
|
||||
obs_enter_graphics();
|
||||
if (customEffect)
|
||||
gs_effect_destroy(customEffect);
|
||||
if (dispmap.texture)
|
||||
gs_texture_destroy(dispmap.texture);
|
||||
obs_leave_graphics();
|
||||
}
|
||||
|
@ -191,7 +189,8 @@ void Filter::Displacement::Instance::video_render(gs_effect_t *) {
|
|||
baseH = obs_source_get_base_height(target);
|
||||
|
||||
// Skip rendering if our target, parent or context is not valid.
|
||||
if (!target || !parent || !context || !dispmap.texture) {
|
||||
if (!target || !parent || !context || !dispmap.texture
|
||||
|| !baseW || !baseH) {
|
||||
obs_source_skip_video_filter(context);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -19,8 +19,15 @@
|
|||
|
||||
#pragma once
|
||||
#include "plugin.h"
|
||||
|
||||
extern "C" {
|
||||
#pragma warning (push)
|
||||
#pragma warning (disable: 4201)
|
||||
#include <libobs/obs-source.h>
|
||||
#include <libobs/util/platform.h>
|
||||
#pragma warning (pop)
|
||||
}
|
||||
|
||||
#include <string>
|
||||
|
||||
#define P_FILTER_DISPLACEMENT "Filter.Displacement"
|
||||
|
|
Loading…
Reference in a new issue