mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-12-28 18:41:14 +00:00
filter-displacement: Fix file dialog and rename filter
This commit is contained in:
parent
cde09ce068
commit
b37fca2149
1 changed files with 3 additions and 3 deletions
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
Filter::Displacement::Displacement() {
|
Filter::Displacement::Displacement() {
|
||||||
memset(&sourceInfo, 0, sizeof(obs_source_info));
|
memset(&sourceInfo, 0, sizeof(obs_source_info));
|
||||||
sourceInfo.id = "obs-stream-effects-displacement";
|
sourceInfo.id = "obs-stream-effects-filter-displacement";
|
||||||
sourceInfo.type = OBS_SOURCE_TYPE_FILTER;
|
sourceInfo.type = OBS_SOURCE_TYPE_FILTER;
|
||||||
sourceInfo.output_flags = OBS_SOURCE_VIDEO;
|
sourceInfo.output_flags = OBS_SOURCE_VIDEO;
|
||||||
sourceInfo.get_name = get_name;
|
sourceInfo.get_name = get_name;
|
||||||
|
@ -81,7 +81,7 @@ obs_properties_t * Filter::Displacement::get_properties(void *ptr) {
|
||||||
path = reinterpret_cast<Instance*>(ptr)->get_file();
|
path = reinterpret_cast<Instance*>(ptr)->get_file();
|
||||||
|
|
||||||
obs_properties_add_path(pr, "file", "File", obs_path_type::OBS_PATH_FILE,
|
obs_properties_add_path(pr, "file", "File", obs_path_type::OBS_PATH_FILE,
|
||||||
"Images (*.png *.jpeg *.jpg *.bmp);*.png *.jpeg *.jpg *.bmp;;All Files (*)", path.c_str());
|
"Images (*.png *.jpeg *.jpg *.bmp);All Files (*)", path.c_str());
|
||||||
obs_properties_add_float_slider(pr, "ratio", "Distance (%)", 0, 1, 0.01);
|
obs_properties_add_float_slider(pr, "ratio", "Distance (%)", 0, 1, 0.01);
|
||||||
obs_properties_add_float_slider(pr, "scale", "Strength", -1000, 1000, 0.01);
|
obs_properties_add_float_slider(pr, "scale", "Strength", -1000, 1000, 0.01);
|
||||||
return pr;
|
return pr;
|
||||||
|
@ -240,7 +240,7 @@ void Filter::Displacement::Instance::updateDisplacementMap(std::string file) {
|
||||||
} else { // Different Timestamps
|
} else { // Different Timestamps
|
||||||
struct stat stats;
|
struct stat stats;
|
||||||
if (os_stat(dispmap.file.c_str(), &stats) != 0) {
|
if (os_stat(dispmap.file.c_str(), &stats) != 0) {
|
||||||
shouldUpdateTexture = shouldUpdateTexture ||
|
shouldUpdateTexture = shouldUpdateTexture ||
|
||||||
(dispmap.createTime != stats.st_ctime) ||
|
(dispmap.createTime != stats.st_ctime) ||
|
||||||
(dispmap.modifiedTime != stats.st_mtime);
|
(dispmap.modifiedTime != stats.st_mtime);
|
||||||
dispmap.createTime = stats.st_ctime;
|
dispmap.createTime = stats.st_ctime;
|
||||||
|
|
Loading…
Reference in a new issue