Fix x64 environment.

This commit is contained in:
love-code-yeyixiao 2024-04-20 10:13:54 +08:00
parent d324fec689
commit 830aa58ae6
1 changed files with 3 additions and 2 deletions

View File

@ -1969,13 +1969,14 @@ _FX BOOL Gui_SetWindowPos(
PVOID pvParam,
UINT fWinIni);
typedef (*P_GetSystemMetrics)(int nIndex);
GET_WIN_API(SystemParametersInfoA, "user32.dll");
GET_WIN_API(GetSystemMetrics, "user32.dll");
P_SystemParametersInfoA SystemParametersInfoA = Ldr_GetProcAddrNew("user32.dll", "SystemParametersInfoA", "SystemParametersInfoA"); if (!SystemParametersInfoA) goto then;
P_GetSystemMetrics GetSystemMetrics = Ldr_GetProcAddrNew("user32.dll", "GetSystemMetrics", "GetSystemMetrics"); if (!GetSystemMetrics) goto then;
SystemParametersInfoA(SPI_GETWORKAREA, 0, &rt, 0);
int y1 = GetSystemMetrics(SM_CYSCREEN) - rt.bottom;
if (y > y1)
y = y1;
}
then:
if (Gui_UseProxyService && !Gui_IsSameBox(hWnd, NULL, NULL)) {
GUI_SET_WINDOW_POS_REQ req;