From 1462ab0cb46bf7f7ab3c987908c738fac55434de Mon Sep 17 00:00:00 2001 From: arcnmx Date: Mon, 31 May 2021 16:12:14 -0700 Subject: [PATCH] [obs] fix cursor blending --- obs/lg.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/obs/lg.c b/obs/lg.c index 3e77cadf..0664ec05 100644 --- a/obs/lg.c +++ b/obs/lg.c @@ -409,7 +409,7 @@ static void lgVideoTick(void * data, float seconds) gs_texture_create( this->cursor.width, this->cursor.height, - GS_RGBA, + GS_BGRA, 1, (const uint8_t **)&this->cursorData, GS_DYNAMIC); @@ -568,8 +568,10 @@ static void lgVideoRender(void * data, gs_effect_t * effect) if (!this->cursorMono) { + gs_blend_function(GS_BLEND_SRCALPHA, GS_BLEND_INVSRCALPHA); while (gs_effect_loop(effect, "Draw")) gs_draw_sprite(this->cursorTex, 0, 0, 0); + gs_blend_function(GS_BLEND_ONE, GS_BLEND_ZERO); } else {