winex11-MONITORENUMPROC: Rebase and move code to user32.

This commit is contained in:
Sebastian Lackner
2016-03-25 22:50:15 +01:00
parent 5cc96d631e
commit 980743ad37
5 changed files with 53 additions and 86 deletions

View File

@@ -0,0 +1,32 @@
From 3c1402c7476be339a313f7603439b42f471a4b12 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Fri, 25 Mar 2016 22:46:15 +0100
Subject: user32: Set %ecx to address of rect in EnumDisplayMonitors callback.
---
dlls/user32/misc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/dlls/user32/misc.c b/dlls/user32/misc.c
index 109809f..54be9c9 100644
--- a/dlls/user32/misc.c
+++ b/dlls/user32/misc.c
@@ -471,6 +471,7 @@ BOOL WINAPI GetMonitorInfoW(HMONITOR hMonitor, LPMONITORINFO lpMonitorInfo)
#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 rect.
*/
struct enumdisplaymonitors_lparam
{
@@ -491,6 +492,7 @@ __ASM_STDCALL_FUNC( enumdisplaymonitors_callback_wrapper, 16,
"pushl 16(%ebp)\n\t"
"pushl 12(%ebp)\n\t"
"pushl 8(%ebp)\n\t"
+ "movl 16(%ebp),%ecx\n\t"
"call *(%eax)\n\t" /* call orig->proc */
"leave\n\t"
__ASM_CFI(".cfi_def_cfa %esp,4\n\t")
--
2.7.1

View File

@@ -0,0 +1 @@
Fixes: [24421] Set %ecx to address of rect in EnumDisplayMonitors callback