Jacek Caban : user32: Set %ecx to rect param when calling monitor enum proc.
Module: wine Branch: master Commit: 66d2321a39f25d3ee9423c20432ce65b45cf1876 URL: https://source.winehq.org/git/wine.git/?a=commit;h=66d2321a39f25d3ee9423c204... Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Dec 7 15:28:29 2021 +0100 user32: Set %ecx to rect param when calling monitor enum proc. This was accidentally removed by 318673405c62. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/sysparams.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/user32/sysparams.c b/dlls/user32/sysparams.c index 498dbacbd37..bcc9c5cbf07 100644 --- a/dlls/user32/sysparams.c +++ b/dlls/user32/sysparams.c @@ -1158,7 +1158,6 @@ BOOL WINAPI GetMonitorInfoW( HMONITOR monitor, LPMONITORINFO info ) #ifdef __i386__ /* Some apps pass a non-stdcall callback to EnumDisplayMonitors, * so we need a small assembly wrapper to call it. - * MJ's Help Diagnostic expects that %ecx contains the address to the rect. */ extern BOOL enum_mon_callback_wrapper( void *proc, HMONITOR monitor, HDC hdc, RECT *rect, LPARAM lparam ); __ASM_GLOBAL_FUNC( enum_mon_callback_wrapper, @@ -1169,7 +1168,9 @@ __ASM_GLOBAL_FUNC( enum_mon_callback_wrapper, __ASM_CFI(".cfi_def_cfa_register %ebp\n\t") "subl $8,%esp\n\t" "pushl 24(%ebp)\n\t" /* lparam */ - "pushl 20(%ebp)\n\t" /* rect */ + /* MJ's Help Diagnostic expects that %ecx contains the address to the rect. */ + "movl 20(%ebp),%ecx\n\t" /* rect */ + "pushl %ecx\n\t" "pushl 16(%ebp)\n\t" /* hdc */ "pushl 12(%ebp)\n\t" /* monitor */ "movl 8(%ebp),%eax\n" /* proc */
participants (1)
-
Alexandre Julliard