mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-30 09:20:40 +00:00
winemac: Detect system cursors from cursor module name in copy_system_cursor_name.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
This commit is contained in:
parent
5e18d7d823
commit
a0a890b78c
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue