[host] added support for cursor pitch

This commit is contained in:
Geoffrey McRae 2017-12-13 04:47:28 +11:00
parent b5a5d4cda2
commit f633c63d51
3 changed files with 3 additions and 0 deletions

View File

@ -304,6 +304,7 @@ GrabStatus DXGI::GrabFrame(FrameInfo & frame)
frame.cursor.shape = m_pointer;
frame.cursor.w = shapeInfo.Width;
frame.cursor.h = shapeInfo.Height;
frame.cursor.pitch = shapeInfo.Pitch;
frame.cursor.dataSize = m_pointerSize;
}

View File

@ -31,6 +31,7 @@ struct CursorInfo
enum CursorType type;
unsigned int w, h;
unsigned int pitch;
void * shape;
unsigned int dataSize;
};

View File

@ -254,6 +254,7 @@ bool Service::Process()
m_header->cursor.type = frame.cursor.type;
m_header->cursor.w = frame.cursor.w;
m_header->cursor.h = frame.cursor.h;
m_header->cursor.pitch = frame.cursor.pitch;
if (frame.cursor.dataSize > KVMFR_CURSOR_BUFFER)
{
DEBUG_ERROR("Cursor shape size exceeds buffer size");