winemac: Directly use ntdll for registry access in copy_system_cursor_name.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
7f7f9fa22c
commit
c883822d2b
|
@ -1,6 +1,6 @@
|
|||
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 void macdrv_process_text_input(UINT vkey, UINT scan, UINT repeat, const B
|
|||
|
||||
/* 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));
|
||||
|
|
Loading…
Reference in New Issue