Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
0ba137e3
Commit
0ba137e3
authored
Aug 25, 2021
by
Rémi Bernon
Committed by
Alexandre Julliard
Aug 26, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Support disabled by default option in device_disabled_registry.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
27266441
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
8 deletions
+15
-8
joystick.c
dlls/dinput/joystick.c
+12
-5
joystick_linux.c
dlls/dinput/joystick_linux.c
+1
-1
joystick_linuxinput.c
dlls/dinput/joystick_linuxinput.c
+1
-1
joystick_private.h
dlls/dinput/joystick_private.h
+1
-1
No files found.
dlls/dinput/joystick.c
View file @
0ba137e3
...
...
@@ -271,13 +271,13 @@ void dump_DIEFFECT(LPCDIEFFECT eff, REFGUID guid, DWORD dwFlags)
}
}
BOOL
device_disabled_registry
(
const
char
*
name
)
BOOL
device_disabled_registry
(
const
char
*
name
,
BOOL
disable
)
{
static
const
char
disabled_str
[]
=
"disabled"
;
static
const
char
enabled_str
[]
=
"enabled"
;
static
const
char
joystick_key
[]
=
"Joysticks"
;
char
buffer
[
MAX_PATH
];
HKEY
hkey
,
appkey
,
temp
;
BOOL
do_disable
=
FALSE
;
get_app_key
(
&
hkey
,
&
appkey
);
...
...
@@ -297,16 +297,23 @@ BOOL device_disabled_registry(const char* name)
/* Look for the "controllername"="disabled" key */
if
(
!
get_config_key
(
hkey
,
appkey
,
name
,
buffer
,
sizeof
(
buffer
)))
if
(
!
strcmp
(
disabled_str
,
buffer
))
{
if
(
!
disable
&&
!
strcmp
(
disabled_str
,
buffer
))
{
TRACE
(
"Disabling joystick '%s' based on registry key.
\n
"
,
name
);
do_disable
=
TRUE
;
disable
=
TRUE
;
}
else
if
(
disable
&&
!
strcmp
(
enabled_str
,
buffer
))
{
TRACE
(
"Enabling joystick '%s' based on registry key.
\n
"
,
name
);
disable
=
FALSE
;
}
}
if
(
appkey
)
RegCloseKey
(
appkey
);
if
(
hkey
)
RegCloseKey
(
hkey
);
return
d
o_d
isable
;
return
disable
;
}
BOOL
is_xinput_device
(
const
DIDEVCAPS
*
devcaps
,
WORD
vid
,
WORD
pid
)
...
...
dlls/dinput/joystick_linux.c
View file @
0ba137e3
...
...
@@ -175,7 +175,7 @@ static INT find_joystick_devices(void)
/* Append driver name */
strcat
(
joydev
.
name
,
JOYDEVDRIVER
);
if
(
device_disabled_registry
(
joydev
.
name
))
{
if
(
device_disabled_registry
(
joydev
.
name
,
FALSE
))
{
close
(
fd
);
continue
;
}
...
...
dlls/dinput/joystick_linuxinput.c
View file @
0ba137e3
...
...
@@ -264,7 +264,7 @@ static void find_joydevs(void)
else
joydev
.
name
=
joydev
.
device
;
if
(
device_disabled_registry
(
joydev
.
name
))
{
if
(
device_disabled_registry
(
joydev
.
name
,
FALSE
))
{
close
(
fd
);
HeapFree
(
GetProcessHeap
(),
0
,
joydev
.
name
);
if
(
joydev
.
name
!=
joydev
.
device
)
...
...
dlls/dinput/joystick_private.h
View file @
0ba137e3
...
...
@@ -57,7 +57,7 @@ HRESULT setup_dinput_options(JoystickGenericImpl *This, const int *default_axis_
DWORD
joystick_map_pov
(
const
POINTL
*
p
)
DECLSPEC_HIDDEN
;
BOOL
device_disabled_registry
(
const
char
*
name
)
DECLSPEC_HIDDEN
;
BOOL
device_disabled_registry
(
const
char
*
name
,
BOOL
disable
)
DECLSPEC_HIDDEN
;
ULONG
WINAPI
JoystickWGenericImpl_Release
(
LPDIRECTINPUTDEVICE8W
iface
);
...
...
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