mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-14 23:34:08 +00:00
libobs: Fix item copying during scene duplication
When item in the old scene had only Scale Filter, texture renderer was not created for an item in the new scene. However if the item also had Crop set, the texture renderer was created. Now after copying the data, texture renderer is created for the item in the new scene when needed. Closes jp9000/obs-studio#969
This commit is contained in:
parent
f8b14bdb46
commit
2a53d03d5f
|
@ -1121,6 +1121,14 @@ obs_scene_t *obs_scene_duplicate(obs_scene_t *scene, const char *name,
|
|||
|
||||
obs_sceneitem_set_crop(new_item, &item->crop);
|
||||
|
||||
if (!new_item->item_render &&
|
||||
item_texture_enabled(new_item)) {
|
||||
obs_enter_graphics();
|
||||
new_item->item_render = gs_texrender_create(
|
||||
GS_RGBA, GS_ZS_NONE);
|
||||
obs_leave_graphics();
|
||||
}
|
||||
|
||||
obs_source_release(source);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue