Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
love-code-yeyixiao committed Mar 16, 2024
1 parent 8b5246f commit 66e86a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sandboxie/core/dll/gdi.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ _FX BOOL Gui_BitBlt(
if (SbieApi_QueryConfBool(NULL, L"IsBlockCapture", FALSE)) {

typedef int (*P_GetDeviceCaps)(_In_opt_ HDC hdc, _In_ int index);
GET_WIN_API(GetDeviceCaps, DllName_gdi32);
P_GetDeviceCaps GetDeviceCaps = Ldr_GetProcAddrNew(DllName_gdi32, "GetDeviceCaps", "GetDeviceCaps"); if (!GetDeviceCaps) return ret;
int iWidth = GetDeviceCaps(hdc, HORZRES), iHeight = GetDeviceCaps(hdc, VERTRES);
int iWidth2 = GetDeviceCaps(__sys_GetDC(NULL), HORZRES), iHeight2 = GetDeviceCaps(__sys_GetDC(NULL), VERTRES);
if (iWidth == iWidth2 && iHeight == iHeight2) {
Expand Down Expand Up @@ -320,7 +320,7 @@ _FX BOOL Gui_StretchBlt(
if (SbieApi_QueryConfBool(NULL, L"IsBlockCapture", FALSE)) {

typedef int (*P_GetDeviceCaps)(_In_opt_ HDC hdc, _In_ int index);
GET_WIN_API(GetDeviceCaps, DllName_gdi32);
P_GetDeviceCaps GetDeviceCaps = Ldr_GetProcAddrNew(DllName_gdi32, "GetDeviceCaps", "GetDeviceCaps"); if (!GetDeviceCaps) return ret;
int iWidth = GetDeviceCaps(hdcDest, HORZRES), iHeight = GetDeviceCaps(hdcDest, VERTRES);
int iWidth2 = GetDeviceCaps(__sys_GetDC(NULL), HORZRES), iHeight2 = GetDeviceCaps(__sys_GetDC(NULL), VERTRES);
if (iWidth == iWidth2 && iHeight == iHeight2) {
Expand Down

0 comments on commit 66e86a5

Please sign in to comment.