Commit db9d41e5 authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

Merge branch 'fix-windows-prefs-permissions'

parents f29d9394 4628ff41
......@@ -189,12 +189,17 @@ static int sys_getpreference(const char *key, char *value, int size)
{
HKEY hkey;
DWORD bigsize = size;
LONG err = RegOpenKeyEx(HKEY_LOCAL_MACHINE,
LONG err = RegOpenKeyEx(HKEY_CURRENT_USER,
"Software\\Purr-Data", 0, KEY_QUERY_VALUE, &hkey);
if (err != ERROR_SUCCESS)
{
err = RegOpenKeyEx(HKEY_LOCAL_MACHINE,
"Software\\Purr-Data", 0, KEY_QUERY_VALUE, &hkey);
if (err != ERROR_SUCCESS)
{
return (0);
}
}
err = RegQueryValueEx(hkey, key, 0, 0, value, &bigsize);
if (err != ERROR_SUCCESS)
{
......@@ -216,7 +221,7 @@ static void sys_initsavepreferences( void)
static void sys_putpreference(const char *key, const char *value)
{
HKEY hkey;
LONG err = RegCreateKeyEx(HKEY_LOCAL_MACHINE,
LONG err = RegCreateKeyEx(HKEY_CURRENT_USER,
"Software\\Purr-Data", 0, NULL, REG_OPTION_NON_VOLATILE, KEY_SET_VALUE,
NULL, &hkey, NULL);
if (err != ERROR_SUCCESS)
......
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