Sfoglia il codice sorgente

win-capture: Fix cursor draw size with certain cursors

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 obsproject/obs-studio#1284
SuslikV 7 anni fa
parent
commit
a75724d8a5
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. 2 1
      plugins/win-capture/dc-capture.c

+ 2 - 1
plugins/win-capture/dc-capture.c

@@ -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.x = ci->ptScreenPos.x - (int)ii.xHotspot - win_pos.x;
 		pos.y = ci->ptScreenPos.y - (int)ii.yHotspot - win_pos.y;
 		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.hbmColor);
 		DeleteObject(ii.hbmMask);
 		DeleteObject(ii.hbmMask);