Skip to content

Commit

Permalink
add version info in the source
Browse files Browse the repository at this point in the history
  • Loading branch information
exeldro committed Nov 25, 2022
1 parent 48f8a9d commit 4b6b986
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ else()
cmake_minimum_required(VERSION 3.18)
endif()

project(source-clone VERSION 0.1.0)
project(source-clone VERSION 0.1.1)
set(PROJECT_FULL_NAME "Source Clone")

# Set new UUIDs when you start to create a new plugin.
Expand Down
2 changes: 1 addition & 1 deletion buildspec.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,5 @@
}
},
"name": "source-clone",
"version": "0.1.0"
"version": "0.1.1"
}
15 changes: 11 additions & 4 deletions source-clone.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,20 @@ obs_properties_t *source_clone_properties(void *data)
obs_enum_sources(source_clone_list_add_source, p);
obs_enum_scenes(source_clone_list_add_source, p);
obs_properties_add_bool(props, "audio", obs_module_text("Audio"));
p = obs_properties_add_list(props, "buffer_frame", "VideoBuffer",
p = obs_properties_add_list(props, "buffer_frame",
obs_module_text("VideoBuffer"),
OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_INT);
obs_property_list_add_int(p, obs_module_text("None"), 0);
obs_property_list_add_int(p, obs_module_text("Full"), 1);
obs_property_list_add_int(p, obs_module_text("Half"), 2);
obs_property_list_add_int(p, obs_module_text("Third"), 3);
obs_property_list_add_int(p, obs_module_text("Quarter"), 4);

obs_properties_add_text(
props, "plugin_info",
"<a href=\"https://obsproject.com/forum/resources/source-clone.1632/\">Source Clone</a> (" PROJECT_VERSION
") by <a href=\"https://www.exeldro.com\">Exeldro</a>",
OBS_TEXT_INFO);
return props;
}

Expand Down Expand Up @@ -253,11 +260,11 @@ void source_clone_video_render(void *data, gs_effect_t *effect)
source_clone_draw_frame(context);
return;
}
if(context->rendering)
if (context->rendering)
return;
context->rendering = true;
obs_source_t *source = obs_weak_source_get_source(context->clone);
if (!source){
if (!source) {
context->rendering = false;
return;
}
Expand All @@ -275,7 +282,7 @@ void source_clone_video_render(void *data, gs_effect_t *effect)
return;
}

if (!context->source_cx || !context->source_cy){
if (!context->source_cx || !context->source_cy) {
obs_source_release(source);
context->rendering = false;
return;
Expand Down

0 comments on commit 4b6b986

Please sign in to comment.