mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-08-05 18:24:08 +00:00
[host] don't fail if windows is dumb and doesnt give us the cursor info
This commit is contained in:
@@ -842,21 +842,9 @@ static CaptureResult dxgi_capture()
|
||||
}
|
||||
|
||||
CURSORINFO ci = { .cbSize = sizeof(CURSORINFO) };
|
||||
if (!GetCursorInfo(&ci))
|
||||
ICONINFO ii;
|
||||
if (GetCursorInfo(&ci) && ci.hCursor && GetIconInfo(ci.hCursor, &ii))
|
||||
{
|
||||
DEBUG_WINERROR("GetCursorInfo failed", GetLastError());
|
||||
return CAPTURE_RESULT_ERROR;
|
||||
}
|
||||
|
||||
if (ci.hCursor)
|
||||
{
|
||||
ICONINFO ii;
|
||||
if (!GetIconInfo(ci.hCursor, &ii))
|
||||
{
|
||||
DEBUG_WINERROR("GetIconInfo failed", GetLastError());
|
||||
return CAPTURE_RESULT_ERROR;
|
||||
}
|
||||
|
||||
DeleteObject(ii.hbmMask);
|
||||
DeleteObject(ii.hbmColor);
|
||||
|
||||
|
Reference in New Issue
Block a user