Skip to content

Commit

Permalink
cursor: implement cursor trail setting
Browse files Browse the repository at this point in the history
  • Loading branch information
quantum5 authored and gnif committed Sep 19, 2022
1 parent 7bc8c5f commit bbbb6bc
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/channel_cursor.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,16 @@ static PS_STATUS onMessage_cursorHide(PSChannel * channel)
return PS_STATUS_OK;
}

static PS_STATUS onMessage_cursorTrail(PSChannel * channel)
{
SpiceMsgCursorTrail * msg = (SpiceMsgCursorTrail *)channel->buffer;

g_ps.cursor.trailLen = msg->length;
g_ps.cursor.trailFreq = msg->frequency;

return PS_STATUS_OK;
}

PSHandlerFn channelCursor_onMessage(PSChannel * channel)
{
channel->initDone = true;
Expand All @@ -225,6 +235,9 @@ PSHandlerFn channelCursor_onMessage(PSChannel * channel)

case SPICE_MSG_CURSOR_HIDE:
return onMessage_cursorHide;

case SPICE_MSG_CURSOR_TRAIL:
return onMessage_cursorTrail;
}

return PS_HANDLER_DISCARD;
Expand Down

0 comments on commit bbbb6bc

Please sign in to comment.