Skip to content

Commit

Permalink
win-capture: Fix cursor draw size with certain cursors
Browse files Browse the repository at this point in the history
When drawing cursor to window capture area - use actual resource width
and height instead of system metric values for icons.  Fixes an issue
where under rare circumstances, certain cursors would not draw at the
correct size.

Closes #1284
  • Loading branch information
SuslikV authored and jp9000 committed May 6, 2018
1 parent 7279e53 commit a75724d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugins/win-capture/dc-capture.c
Expand Up @@ -103,7 +103,8 @@ static void draw_cursor(struct dc_capture *capture, HDC hdc, HWND window)
pos.x = ci->ptScreenPos.x - (int)ii.xHotspot - win_pos.x;
pos.y = ci->ptScreenPos.y - (int)ii.yHotspot - win_pos.y;

DrawIcon(hdc, pos.x, pos.y, icon);
DrawIconEx(hdc, pos.x, pos.y, icon, 0, 0, 0, NULL,
DI_NORMAL);

DeleteObject(ii.hbmColor);
DeleteObject(ii.hbmMask);
Expand Down

0 comments on commit a75724d

Please sign in to comment.