Skip to content

Commit 4e897b9

Browse files
committed
Fix small size of full size screenshots at high DPI
1 parent fc1241f commit 4e897b9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/WinWebDiffLib/WebWindow.hpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -505,8 +505,11 @@ class CWebWindow
505505

506506
WDocument document;
507507
document.Parse(returnObjectAsJson);
508-
int width = document[L"cssContentSize"][L"width"].GetInt();
509-
int height = document[L"cssContentSize"][L"height"].GetInt();
508+
UINT dpi = GetDpiForWindow(m_hWnd);
509+
int width = document[L"cssContentSize"][L"width"].GetInt()
510+
* dpi / 96;
511+
int height = document[L"cssContentSize"][L"height"].GetInt()
512+
* dpi / 96;
510513

511514
if (fullSize)
512515
{

0 commit comments

Comments
 (0)