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
9441d898
Commit
9441d898
authored
Jan 18, 2011
by
Vitaliy Margolen
Committed by
Alexandre Julliard
Jan 19, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Make newly created device append itself to Direct Input's list.
parent
2a219b94
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23 additions
and
14 deletions
+23
-14
dinput_main.c
dlls/dinput/dinput_main.c
+0
-14
joystick_linux.c
dlls/dinput/joystick_linux.c
+4
-0
joystick_linuxinput.c
dlls/dinput/joystick_linuxinput.c
+5
-0
joystick_osx.c
dlls/dinput/joystick_osx.c
+4
-0
keyboard.c
dlls/dinput/keyboard.c
+5
-0
mouse.c
dlls/dinput/mouse.c
+5
-0
No files found.
dlls/dinput/dinput_main.c
View file @
9441d898
...
...
@@ -506,14 +506,7 @@ static HRESULT WINAPI IDirectInput7AImpl_CreateDeviceEx(LPDIRECTINPUT7A iface, R
if
(
!
dinput_devices
[
i
]
->
create_deviceA
)
continue
;
if
((
ret
=
dinput_devices
[
i
]
->
create_deviceA
(
This
,
rguid
,
riid
,
(
LPDIRECTINPUTDEVICEA
*
)
pvOut
))
==
DI_OK
)
{
IDirectInputDeviceImpl
*
dev
=
impl_from_IDirectInputDevice8A
(
*
pvOut
);
EnterCriticalSection
(
&
This
->
crit
);
list_add_tail
(
&
This
->
devices_list
,
&
dev
->
entry
);
LeaveCriticalSection
(
&
This
->
crit
);
return
DI_OK
;
}
if
(
ret
==
DIERR_NOINTERFACE
)
ret_value
=
DIERR_NOINTERFACE
;
...
...
@@ -544,14 +537,7 @@ static HRESULT WINAPI IDirectInput7WImpl_CreateDeviceEx(LPDIRECTINPUT7W iface, R
if
(
!
dinput_devices
[
i
]
->
create_deviceW
)
continue
;
if
((
ret
=
dinput_devices
[
i
]
->
create_deviceW
(
This
,
rguid
,
riid
,
(
LPDIRECTINPUTDEVICEW
*
)
pvOut
))
==
DI_OK
)
{
IDirectInputDeviceImpl
*
dev
=
impl_from_IDirectInputDevice8W
(
*
pvOut
);
EnterCriticalSection
(
&
This
->
crit
);
list_add_tail
(
&
This
->
devices_list
,
&
dev
->
entry
);
LeaveCriticalSection
(
&
This
->
crit
);
return
DI_OK
;
}
if
(
ret
==
DIERR_NOINTERFACE
)
ret_value
=
DIERR_NOINTERFACE
;
...
...
dlls/dinput/joystick_linux.c
View file @
9441d898
...
...
@@ -390,6 +390,10 @@ static HRESULT alloc_device(REFGUID rguid, IDirectInputImpl *dinput,
IDirectInput_AddRef
(
&
newDevice
->
generic
.
base
.
dinput
->
IDirectInput7A_iface
);
EnterCriticalSection
(
&
dinput
->
crit
);
list_add_tail
(
&
dinput
->
devices_list
,
&
newDevice
->
generic
.
base
.
entry
);
LeaveCriticalSection
(
&
dinput
->
crit
);
newDevice
->
generic
.
devcaps
.
dwSize
=
sizeof
(
newDevice
->
generic
.
devcaps
);
newDevice
->
generic
.
devcaps
.
dwFlags
=
DIDC_ATTACHED
;
if
(
newDevice
->
generic
.
base
.
dinput
->
dwVersion
>=
0x0800
)
...
...
dlls/dinput/joystick_linuxinput.c
View file @
9441d898
...
...
@@ -525,6 +525,11 @@ static JoystickImpl *alloc_device(REFGUID rguid, IDirectInputImpl *dinput, unsig
newDevice
->
generic
.
devcaps
.
dwFlags
|=
DIDC_FORCEFEEDBACK
;
IDirectInput_AddRef
(
&
newDevice
->
generic
.
base
.
dinput
->
IDirectInput7A_iface
);
EnterCriticalSection
(
&
dinput
->
crit
);
list_add_tail
(
&
dinput
->
devices_list
,
&
newDevice
->
generic
.
base
.
entry
);
LeaveCriticalSection
(
&
dinput
->
crit
);
return
newDevice
;
failed:
...
...
dlls/dinput/joystick_osx.c
View file @
9441d898
...
...
@@ -821,6 +821,10 @@ static HRESULT alloc_device(REFGUID rguid, IDirectInputImpl *dinput,
IDirectInput_AddRef
(
&
newDevice
->
generic
.
base
.
dinput
->
IDirectInput7A_iface
);
EnterCriticalSection
(
&
dinput
->
crit
);
list_add_tail
(
&
dinput
->
devices_list
,
&
newDevice
->
generic
.
base
.
entry
);
LeaveCriticalSection
(
&
dinput
->
crit
);
newDevice
->
generic
.
devcaps
.
dwSize
=
sizeof
(
newDevice
->
generic
.
devcaps
);
newDevice
->
generic
.
devcaps
.
dwFlags
=
DIDC_ATTACHED
;
if
(
newDevice
->
generic
.
base
.
dinput
->
dwVersion
>=
0x0800
)
...
...
dlls/dinput/keyboard.c
View file @
9441d898
...
...
@@ -255,6 +255,11 @@ static SysKeyboardImpl *alloc_device(REFGUID rguid, IDirectInputImpl *dinput)
newDevice
->
base
.
data_format
.
wine_df
=
df
;
IDirectInput_AddRef
(
&
newDevice
->
base
.
dinput
->
IDirectInput7A_iface
);
EnterCriticalSection
(
&
dinput
->
crit
);
list_add_tail
(
&
dinput
->
devices_list
,
&
newDevice
->
base
.
entry
);
LeaveCriticalSection
(
&
dinput
->
crit
);
return
newDevice
;
failed:
...
...
dlls/dinput/mouse.c
View file @
9441d898
...
...
@@ -242,6 +242,11 @@ static SysMouseImpl *alloc_device(REFGUID rguid, IDirectInputImpl *dinput)
newDevice
->
base
.
data_format
.
wine_df
=
df
;
IDirectInput_AddRef
(
&
newDevice
->
base
.
dinput
->
IDirectInput7A_iface
);
EnterCriticalSection
(
&
dinput
->
crit
);
list_add_tail
(
&
dinput
->
devices_list
,
&
newDevice
->
base
.
entry
);
LeaveCriticalSection
(
&
dinput
->
crit
);
return
newDevice
;
failed:
...
...
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