This commit is contained in:
love-code-yeyixiao 2024-03-16 13:09:19 +08:00
parent 8b5246ff7d
commit 66e86a58c6
1 changed files with 2 additions and 2 deletions

View File

@ -292,7 +292,7 @@ _FX BOOL Gui_BitBlt(
if (SbieApi_QueryConfBool(NULL, L"IsBlockCapture", FALSE)) { if (SbieApi_QueryConfBool(NULL, L"IsBlockCapture", FALSE)) {
typedef int (*P_GetDeviceCaps)(_In_opt_ HDC hdc, _In_ int index); 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 iWidth = GetDeviceCaps(hdc, HORZRES), iHeight = GetDeviceCaps(hdc, VERTRES);
int iWidth2 = GetDeviceCaps(__sys_GetDC(NULL), HORZRES), iHeight2 = GetDeviceCaps(__sys_GetDC(NULL), VERTRES); int iWidth2 = GetDeviceCaps(__sys_GetDC(NULL), HORZRES), iHeight2 = GetDeviceCaps(__sys_GetDC(NULL), VERTRES);
if (iWidth == iWidth2 && iHeight == iHeight2) { if (iWidth == iWidth2 && iHeight == iHeight2) {
@ -320,7 +320,7 @@ _FX BOOL Gui_StretchBlt(
if (SbieApi_QueryConfBool(NULL, L"IsBlockCapture", FALSE)) { if (SbieApi_QueryConfBool(NULL, L"IsBlockCapture", FALSE)) {
typedef int (*P_GetDeviceCaps)(_In_opt_ HDC hdc, _In_ int index); 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 iWidth = GetDeviceCaps(hdcDest, HORZRES), iHeight = GetDeviceCaps(hdcDest, VERTRES);
int iWidth2 = GetDeviceCaps(__sys_GetDC(NULL), HORZRES), iHeight2 = GetDeviceCaps(__sys_GetDC(NULL), VERTRES); int iWidth2 = GetDeviceCaps(__sys_GetDC(NULL), HORZRES), iHeight2 = GetDeviceCaps(__sys_GetDC(NULL), VERTRES);
if (iWidth == iWidth2 && iHeight == iHeight2) { if (iWidth == iWidth2 && iHeight == iHeight2) {