mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-22 05:27:20 +00:00
[obs] fix cursor blending
This commit is contained in:
parent
186b0f1efd
commit
1462ab0cb4
4
obs/lg.c
4
obs/lg.c
@ -409,7 +409,7 @@ static void lgVideoTick(void * data, float seconds)
|
|||||||
gs_texture_create(
|
gs_texture_create(
|
||||||
this->cursor.width,
|
this->cursor.width,
|
||||||
this->cursor.height,
|
this->cursor.height,
|
||||||
GS_RGBA,
|
GS_BGRA,
|
||||||
1,
|
1,
|
||||||
(const uint8_t **)&this->cursorData,
|
(const uint8_t **)&this->cursorData,
|
||||||
GS_DYNAMIC);
|
GS_DYNAMIC);
|
||||||
@ -568,8 +568,10 @@ static void lgVideoRender(void * data, gs_effect_t * effect)
|
|||||||
|
|
||||||
if (!this->cursorMono)
|
if (!this->cursorMono)
|
||||||
{
|
{
|
||||||
|
gs_blend_function(GS_BLEND_SRCALPHA, GS_BLEND_INVSRCALPHA);
|
||||||
while (gs_effect_loop(effect, "Draw"))
|
while (gs_effect_loop(effect, "Draw"))
|
||||||
gs_draw_sprite(this->cursorTex, 0, 0, 0);
|
gs_draw_sprite(this->cursorTex, 0, 0, 0);
|
||||||
|
gs_blend_function(GS_BLEND_ONE, GS_BLEND_ZERO);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user