Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Rishabh Gupta
purr-data
Commits
db9d41e5
Commit
db9d41e5
authored
Dec 07, 2016
by
Jonathan Wilkes
Browse files
Merge branch 'fix-windows-prefs-permissions'
parents
f29d9394
4628ff41
Changes
1
Hide whitespace changes
Inline
Side-by-side
pd/src/s_file.c
View file @
db9d41e5
...
...
@@ -189,11 +189,16 @@ 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
)
{
return
(
0
);
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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment