[client] added initial code for rendering the cursor shape

This commit is contained in:
Geoffrey McRae
2017-12-13 03:08:13 +11:00
parent 4b4aca841c
commit a950f7b187
3 changed files with 46 additions and 0 deletions

View File

@@ -317,6 +317,31 @@ int renderThread(void * unused)
if (header.cursor.flags & KVMFR_CURSOR_FLAG_SHAPE)
{
LG_RendererCursor c = LG_CURSOR_COLOR;
switch(header.cursor.type)
{
case CURSOR_TYPE_COLOR : c = LG_CURSOR_COLOR ; break;
case CURSOR_TYPE_MONOCHROME : c = LG_CURSOR_MONOCHROME ; break;
case CURSOR_TYPE_MASKED_COLOR: c = LG_CURSOR_MASKED_COLOR; break;
default:
DEBUG_ERROR("Invalid cursor type");
break;
}
if (state.lgr)
{
if (!state.lgr->on_mouse_shape(
state.lgrData,
c,
header.cursor.w,
header.cursor.h,
header.cursor.shape
))
{
DEBUG_ERROR("Failed to update mouse shape");
break;
}
}
}
if (state.lgr)