Skip to content

Commit 60da328

Browse files
committed
Make sure to only flip texture if hwaccel is true
Fixes a bug where if the user switches in/out of hardware acceleration mode, the texture would be inadvertently flipped.
1 parent 0209444 commit 60da328

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

obs-browser-source.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,11 +390,16 @@ void BrowserSource::Tick()
390390

391391
void BrowserSource::Render()
392392
{
393+
bool flip = false;
394+
#if EXPERIMENTAL_SHARED_TEXTURE_SUPPORT_ENABLED
395+
flip = hwaccel;
396+
#endif
397+
393398
if (texture) {
394399
gs_effect_t *effect = obs_get_base_effect(
395400
OBS_EFFECT_PREMULTIPLIED_ALPHA);
396401
while (gs_effect_loop(effect, "Draw"))
397-
obs_source_draw(texture, 0, 0, 0, 0, tex_sharing_avail);
402+
obs_source_draw(texture, 0, 0, 0, 0, flip);
398403
}
399404

400405
#if EXPERIMENTAL_SHARED_TEXTURE_SUPPORT_ENABLED

0 commit comments

Comments
 (0)