Fix/Improve: fix #267 and scale 4K desktop screen to 1080P

This commit is contained in:
yuanyuanxiang
2025-12-24 09:24:15 +01:00
parent 47ac8fb0d2
commit 2ee61a760f
20 changed files with 109 additions and 51 deletions

View File

@@ -126,12 +126,12 @@ public:
const LPBITMAPINFO& GetBIData() const
{
return m_BitmapInfor_Full;
return m_BitmapInfor_Send;
}
ULONG GetFirstScreenLength() const
{
return m_BitmapInfor_Full->bmiHeader.biSizeImage;
return m_BitmapInfor_Send->bmiHeader.biSizeImage;
}
static BOOL PaintWindow(HWND hWnd, EnumHwndsPrintData* data)
@@ -194,7 +194,8 @@ public:
virtual LPBYTE ScanNextScreen()
{
ScanScreen(m_hDiffMemDC, m_hDeskTopDC, m_ulFullWidth, m_ulFullHeight);
return (LPBYTE)m_DiffBitmapData_Full;
LPBYTE bmp = scaleBitmap(m_BmpZoomBuffer, (LPBYTE)m_DiffBitmapData_Full);
return (LPBYTE)bmp;
}
VOID ScanScreen(HDC hdcDest, HDC hdcSour, ULONG ulWidth, ULONG ulHeight);