Commit c883822d authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

winemac: Directly use ntdll for registry access in copy_system_cursor_name.

parent 7f7f9fa2
EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = winemac.drv
IMPORTS = uuid rpcrt4 user32 gdi32 advapi32 win32u
IMPORTS = uuid rpcrt4 user32 gdi32 win32u
DELAYIMPORTS = ole32 shell32 imm32
EXTRALIBS = -framework AppKit -framework Carbon -framework Security -framework OpenGL -framework IOKit -framework CoreVideo -framework QuartzCore $(METAL_LIBS)
......
......@@ -295,6 +295,7 @@ extern BOOL query_ime_char_rect(macdrv_query* query) DECLSPEC_HIDDEN;
/* registry helpers */
extern HKEY open_hkcu_key( const char *name ) DECLSPEC_HIDDEN;
extern ULONG query_reg_value(HKEY hkey, const WCHAR *name, KEY_VALUE_PARTIAL_INFORMATION *info,
ULONG size) DECLSPEC_HIDDEN;
extern HKEY reg_create_ascii_key(HKEY root, const char *name, DWORD options,
......
......@@ -122,7 +122,7 @@ HKEY reg_open_key(HKEY root, const WCHAR *name, ULONG name_len)
}
static HKEY open_hkcu_key(const char *name)
HKEY open_hkcu_key(const char *name)
{
WCHAR bufferW[256];
static HKEY hkcu;
......
......@@ -195,17 +195,17 @@ CFStringRef copy_system_cursor_name(ICONINFOEXW *info)
else sprintfW(p, idW, info->wResID);
/* @@ Wine registry key: HKCU\Software\Wine\Mac Driver\Cursors */
if (!RegOpenKeyA(HKEY_CURRENT_USER, "Software\\Wine\\Mac Driver\\Cursors", &key))
if (!(key = open_hkcu_key("Software\\Wine\\Mac Driver\\Cursors")))
{
WCHAR value[64];
DWORD size, ret;
char buffer[2048];
KEY_VALUE_PARTIAL_INFORMATION *info = (void *)buffer;
DWORD ret;
value[0] = 0;
size = sizeof(value);
ret = RegQueryValueExW(key, name, NULL, NULL, (BYTE *)value, &size);
RegCloseKey(key);
if (!ret)
ret = query_reg_value(key, name, info, sizeof(buffer));
NtClose(key);
if (ret)
{
const WCHAR *value = (const WCHAR *)info->Data;
if (!value[0])
{
TRACE("registry forces standard cursor for %s\n", debugstr_w(name));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment