From: Jacek Caban jacek@codeweavers.com
Signed-off-by: Jacek Caban jacek@codeweavers.com --- dlls/winemac.drv/macdrv.h | 1 + dlls/winemac.drv/mouse.c | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/dlls/winemac.drv/macdrv.h b/dlls/winemac.drv/macdrv.h index 04a8af81c53..26028247a96 100644 --- a/dlls/winemac.drv/macdrv.h +++ b/dlls/winemac.drv/macdrv.h @@ -367,6 +367,7 @@ static inline UINT asciiz_to_unicode(WCHAR *dst, const char *src) }
/* FIXME: remove once we use unixlib */ +#define wcsicmp strcmpiW #define wcsnicmp strncmpiW #define wcsrchr strrchrW #define wcstol strtolW diff --git a/dlls/winemac.drv/mouse.c b/dlls/winemac.drv/mouse.c index d5db014dece..078b674d7c0 100644 --- a/dlls/winemac.drv/mouse.c +++ b/dlls/winemac.drv/mouse.c @@ -170,7 +170,7 @@ CFStringRef copy_system_cursor_name(ICONINFOEXW *info) const struct system_cursors *cursors; unsigned int i; CFStringRef cursor_name = NULL; - HMODULE module; + const WCHAR *module; HKEY key; WCHAR *p, name[MAX_PATH * 2];
@@ -223,10 +223,11 @@ CFStringRef copy_system_cursor_name(ICONINFOEXW *info) }
if (info->szResName[0]) goto done; /* only integer resources are supported here */ - if (!(module = GetModuleHandleW(info->szModName))) goto done;
- for (i = 0; i < ARRAY_SIZE(module_cursors); i++) - if (GetModuleHandleW(module_cursors[i].name) == module) break; + if ((module = wcsrchr(info->szModName, '\'))) module++; + else module = info->szModName; + for (i = 0; i < ARRAY_SIZE( module_cursors ); i++) + if (!wcsicmp(module, module_cursors[i].name)) break; if (i == ARRAY_SIZE(module_cursors)) goto done;
cursors = module_cursors[i].cursors;