mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-12-28 18:41:14 +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,10 +139,8 @@ 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);
|
||||
gs_effect_destroy(customEffect);
|
||||
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