mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-08-09 20:24:14 +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) };
|
CURSORINFO ci = { .cbSize = sizeof(CURSORINFO) };
|
||||||
if (!GetCursorInfo(&ci))
|
|
||||||
{
|
|
||||||
DEBUG_WINERROR("GetCursorInfo failed", GetLastError());
|
|
||||||
return CAPTURE_RESULT_ERROR;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ci.hCursor)
|
|
||||||
{
|
|
||||||
ICONINFO ii;
|
ICONINFO ii;
|
||||||
if (!GetIconInfo(ci.hCursor, &ii))
|
if (GetCursorInfo(&ci) && ci.hCursor && 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);
|
||||||
|
|
||||||
|
Submodule repos/LGMP updated: 0102436ae2...2a1477550c
Submodule repos/PureSpice updated: 35ecd45b0e...4ca2b08d00
Reference in New Issue
Block a user