Skip to content

Commit

Permalink
[host] don't fail if windows is dumb and doesnt give us the cursor info
Browse files Browse the repository at this point in the history
  • Loading branch information
gnif committed Oct 31, 2020
1 parent 42ef996 commit 604b6be
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 16 deletions.
16 changes: 2 additions & 14 deletions host/platform/Windows/capture/DXGI/src/dxgi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion repos/LGMP
2 changes: 1 addition & 1 deletion repos/PureSpice
Submodule PureSpice updated 1 files
+13 −17 src/rsa.c

0 comments on commit 604b6be

Please sign in to comment.