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
cfd3076c
Commit
cfd3076c
authored
Aug 16, 2016
by
Bruno Jesus
Committed by
Alexandre Julliard
Aug 17, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Implement GetDeviceInfo(A) using the W version in the js driver.
Signed-off-by:
Bruno Jesus
<
00cpxxx@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7439f794
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
17 deletions
+17
-17
joystick_linux.c
dlls/dinput/joystick_linux.c
+17
-17
No files found.
dlls/dinput/joystick_linux.c
View file @
cfd3076c
...
...
@@ -281,7 +281,7 @@ static INT find_joystick_devices(void)
return
joystick_devices_count
;
}
static
void
fill_joystick_dideviceinstance
A
(
LPDIDEVICEINSTANCEA
lpddi
,
DWORD
version
,
int
id
)
static
void
fill_joystick_dideviceinstance
W
(
LPDIDEVICEINSTANCEW
lpddi
,
DWORD
version
,
int
id
)
{
DWORD
dwSize
=
lpddi
->
dwSize
;
...
...
@@ -298,33 +298,33 @@ static void fill_joystick_dideviceinstanceA(LPDIDEVICEINSTANCEA lpddi, DWORD ver
lpddi
->
dwDevType
=
DI8DEVTYPE_JOYSTICK
|
(
DI8DEVTYPEJOYSTICK_STANDARD
<<
8
);
else
lpddi
->
dwDevType
=
DIDEVTYPE_JOYSTICK
|
(
DIDEVTYPEJOYSTICK_TRADITIONAL
<<
8
);
strcpy
(
lpddi
->
tszInstanceName
,
joystick_devices
[
id
].
name
);
strcpy
(
lpddi
->
tszProductName
,
joystick_devices
[
id
].
name
);
MultiByteToWideChar
(
CP_ACP
,
0
,
joystick_devices
[
id
].
name
,
-
1
,
lpddi
->
tszInstanceName
,
MAX_PATH
);
MultiByteToWideChar
(
CP_ACP
,
0
,
joystick_devices
[
id
].
name
,
-
1
,
lpddi
->
tszProductName
,
MAX_PATH
);
lpddi
->
guidFFDriver
=
GUID_NULL
;
}
static
void
fill_joystick_dideviceinstance
W
(
LPDIDEVICEINSTANCEW
lpddi
,
DWORD
version
,
int
id
)
static
void
fill_joystick_dideviceinstance
A
(
LPDIDEVICEINSTANCEA
lpddi
,
DWORD
version
,
int
id
)
{
DIDEVICEINSTANCEW
lpddiW
;
DWORD
dwSize
=
lpddi
->
dwSize
;
lpddiW
.
dwSize
=
sizeof
(
lpddiW
);
fill_joystick_dideviceinstanceW
(
&
lpddiW
,
version
,
id
);
TRACE
(
"%d %p
\n
"
,
dwSize
,
lpddi
);
memset
(
lpddi
,
0
,
dwSize
);
/*
Return joystick
*/
/*
Convert W->A
*/
lpddi
->
dwSize
=
dwSize
;
lpddi
->
guidInstance
=
DInput_Wine_Joystick_GUID
;
lpddi
->
guidInstance
.
Data3
=
id
;
lpddi
->
guidProduct
=
joystick_devices
[
id
].
guid_product
;
/* we only support traditional joysticks for now */
if
(
version
>=
0x0800
)
lpddi
->
dwDevType
=
DI8DEVTYPE_JOYSTICK
|
(
DI8DEVTYPEJOYSTICK_STANDARD
<<
8
);
else
lpddi
->
dwDevType
=
DIDEVTYPE_JOYSTICK
|
(
DIDEVTYPEJOYSTICK_TRADITIONAL
<<
8
);
MultiByteToWideChar
(
CP_ACP
,
0
,
joystick_devices
[
id
].
name
,
-
1
,
lpddi
->
tszInstanceName
,
MAX_PATH
);
MultiByteToWideChar
(
CP_ACP
,
0
,
joystick_devices
[
id
].
name
,
-
1
,
lpddi
->
tszProductName
,
MAX_PATH
);
lpddi
->
guidFFDriver
=
GUID_NULL
;
lpddi
->
guidInstance
=
lpddiW
.
guidInstance
;
lpddi
->
guidProduct
=
lpddiW
.
guidProduct
;
lpddi
->
dwDevType
=
lpddiW
.
dwDevType
;
strcpy
(
lpddi
->
tszInstanceName
,
joystick_devices
[
id
].
name
);
strcpy
(
lpddi
->
tszProductName
,
joystick_devices
[
id
].
name
);
lpddi
->
guidFFDriver
=
lpddiW
.
guidFFDriver
;
lpddi
->
wUsagePage
=
lpddiW
.
wUsagePage
;
lpddi
->
wUsage
=
lpddiW
.
wUsage
;
}
static
HRESULT
joydev_enum_deviceA
(
DWORD
dwDevType
,
DWORD
dwFlags
,
LPDIDEVICEINSTANCEA
lpddi
,
DWORD
version
,
int
id
)
...
...
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