mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-22 05:27:20 +00:00
[obs] added masked color cursor support
This commit is contained in:
parent
e2f6621de9
commit
eb343ca82e
12
obs/lg.c
12
obs/lg.c
@ -247,6 +247,15 @@ static void * pointerThread(void * data)
|
||||
|
||||
memcpy(this->cursorData, data, dataSize);
|
||||
|
||||
if (cursor->type == CURSOR_TYPE_MASKED_COLOR)
|
||||
{
|
||||
for(int i = 0; i < dataSize; ++i)
|
||||
{
|
||||
const uint32_t c = ((uint32_t *)this->cursorData)[i];
|
||||
((uint32_t *)this->cursorData)[i] = (c & ~0xFF000000) | (c & 0xFF000000 ? 0x0 : 0xFF000000);
|
||||
}
|
||||
}
|
||||
|
||||
this->cursor.width = cursor->width;
|
||||
this->cursor.height = cursor->height;
|
||||
this->cursor.hx = cursor->hx;
|
||||
@ -348,6 +357,9 @@ static void lgVideoTick(void * data, float seconds)
|
||||
|
||||
switch(this->cursor.type)
|
||||
{
|
||||
case CURSOR_TYPE_MASKED_COLOR:
|
||||
/* fallthrough */
|
||||
|
||||
case CURSOR_TYPE_COLOR:
|
||||
this->cursorTex =
|
||||
gs_texture_create(
|
||||
|
Loading…
Reference in New Issue
Block a user