Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
3505cdbf
Commit
3505cdbf
authored
Aug 16, 2023
by
Alex Henrie
Committed by
Alexandre Julliard
Aug 17, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
joy: Remove size argument to set_config_key function.
parent
a743f085
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
main.c
dlls/joy.cpl/main.c
+7
-5
No files found.
dlls/joy.cpl/main.c
View file @
3505cdbf
...
...
@@ -123,7 +123,7 @@ static BOOL get_app_key(HKEY *defkey, HKEY *appkey)
* set_config_key [internal]
* Writes a string value to a registry key, deletes the key if value == NULL
*/
static
DWORD
set_config_key
(
HKEY
defkey
,
HKEY
appkey
,
const
WCHAR
*
name
,
const
WCHAR
*
value
,
DWORD
size
)
static
DWORD
set_config_key
(
HKEY
defkey
,
HKEY
appkey
,
const
WCHAR
*
name
,
const
WCHAR
*
value
)
{
if
(
value
==
NULL
)
{
...
...
@@ -135,6 +135,8 @@ static DWORD set_config_key(HKEY defkey, HKEY appkey, const WCHAR *name, const W
}
else
{
DWORD
size
=
wcslen
(
value
);
if
(
appkey
&&
!
RegSetValueExW
(
appkey
,
name
,
0
,
REG_SZ
,
(
const
BYTE
*
)
value
,
(
size
+
1
)
*
sizeof
(
WCHAR
)))
return
0
;
...
...
@@ -157,9 +159,9 @@ static void enable_joystick(WCHAR *joy_name, BOOL enable)
get_app_key
(
&
hkey
,
&
appkey
);
if
(
!
enable
)
set_config_key
(
hkey
,
appkey
,
joy_name
,
L"disabled"
,
wcslen
(
L"disabled"
)
);
set_config_key
(
hkey
,
appkey
,
joy_name
,
L"disabled"
);
else
set_config_key
(
hkey
,
appkey
,
joy_name
,
NULL
,
0
);
set_config_key
(
hkey
,
appkey
,
joy_name
,
NULL
);
if
(
hkey
)
RegCloseKey
(
hkey
);
if
(
appkey
)
RegCloseKey
(
appkey
);
...
...
@@ -230,9 +232,9 @@ static void override_joystick(WCHAR *joy_name, BOOL override)
get_app_key
(
&
hkey
,
&
appkey
);
if
(
override
)
set_config_key
(
hkey
,
appkey
,
joy_name
,
L"override"
,
wcslen
(
L"override"
)
);
set_config_key
(
hkey
,
appkey
,
joy_name
,
L"override"
);
else
set_config_key
(
hkey
,
appkey
,
joy_name
,
NULL
,
0
);
set_config_key
(
hkey
,
appkey
,
joy_name
,
NULL
);
if
(
hkey
)
RegCloseKey
(
hkey
);
if
(
appkey
)
RegCloseKey
(
appkey
);
...
...
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