[host] don't fail if windows is dumb and doesnt give us the cursor info

This commit is contained in:
Geoffrey McRae 2020-11-01 04:45:57 +11:00
parent 42ef9964de
commit 604b6bec9a
3 changed files with 4 additions and 16 deletions

View File

@ -842,21 +842,9 @@ static CaptureResult dxgi_capture()
} }
CURSORINFO ci = { .cbSize = sizeof(CURSORINFO) }; 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.hbmMask);
DeleteObject(ii.hbmColor); DeleteObject(ii.hbmColor);

@ -1 +1 @@
Subproject commit 0102436ae24386f731e7b9df75180a2374d8b89b Subproject commit 2a1477550cc122dcac8af7016ac5f15dec2e139a

@ -1 +1 @@
Subproject commit 35ecd45b0e441a6da2be1069a902985ae33570a1 Subproject commit 4ca2b08d007c0cd17665f6f19fb160a3c111024b