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
b53df5df
Commit
b53df5df
authored
Nov 26, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Nov 28, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
joy.cpl: Read the device instance name instead of storing it.
parent
9d4a9e16
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
7 deletions
+14
-7
main.c
dlls/joy.cpl/main.c
+14
-7
No files found.
dlls/joy.cpl/main.c
View file @
b53df5df
...
...
@@ -78,7 +78,6 @@ struct effect
struct
Joystick
{
IDirectInputDevice8W
*
device
;
DIDEVICEINSTANCEW
instance
;
int
num_buttons
;
int
num_axes
;
BOOL
forcefeedback
;
...
...
@@ -247,8 +246,6 @@ static BOOL CALLBACK enum_callback(const DIDEVICEINSTANCEW *instance, void *cont
IDirectInput8_CreateDevice
(
data
->
di
,
&
instance
->
guidInstance
,
&
joystick
->
device
,
NULL
);
IDirectInputDevice8_SetDataFormat
(
joystick
->
device
,
&
c_dfDIJoystick
);
joystick
->
instance
=
*
instance
;
caps
.
dwSize
=
sizeof
(
caps
);
IDirectInputDevice8_GetCapabilities
(
joystick
->
device
,
&
caps
);
...
...
@@ -400,8 +397,10 @@ static void refresh_joystick_list(HWND hwnd, struct JoystickData *data)
for
(
joy
=
data
->
joysticks
,
joy_end
=
joy
+
data
->
num_joysticks
;
joy
!=
joy_end
;
++
joy
)
{
if
(
joy
->
is_xinput
)
SendDlgItemMessageW
(
hwnd
,
IDC_XINPUTLIST
,
LB_ADDSTRING
,
0
,
(
LPARAM
)
joy
->
instance
.
tszInstanceName
);
else
SendDlgItemMessageW
(
hwnd
,
IDC_JOYSTICKLIST
,
LB_ADDSTRING
,
0
,
(
LPARAM
)
joy
->
instance
.
tszInstanceName
);
DIDEVICEINSTANCEW
info
=
{.
dwSize
=
sizeof
(
DIDEVICEINSTANCEW
)};
if
(
FAILED
(
IDirectInputDevice8_GetDeviceInfo
(
joy
->
device
,
&
info
)))
continue
;
if
(
joy
->
is_xinput
)
SendDlgItemMessageW
(
hwnd
,
IDC_XINPUTLIST
,
LB_ADDSTRING
,
0
,
(
LPARAM
)
info
.
tszInstanceName
);
else
SendDlgItemMessageW
(
hwnd
,
IDC_JOYSTICKLIST
,
LB_ADDSTRING
,
0
,
(
LPARAM
)
info
.
tszInstanceName
);
}
/* Search for disabled joysticks */
...
...
@@ -760,7 +759,11 @@ static void refresh_test_joystick_list(HWND hwnd, struct JoystickData *data)
struct
Joystick
*
joy
,
*
joy_end
;
SendDlgItemMessageW
(
hwnd
,
IDC_TESTSELECTCOMBO
,
CB_RESETCONTENT
,
0
,
0
);
for
(
joy
=
data
->
joysticks
,
joy_end
=
joy
+
data
->
num_joysticks
;
joy
!=
joy_end
;
++
joy
)
SendDlgItemMessageW
(
hwnd
,
IDC_TESTSELECTCOMBO
,
CB_ADDSTRING
,
0
,
(
LPARAM
)
joy
->
instance
.
tszInstanceName
);
{
DIDEVICEINSTANCEW
info
=
{.
dwSize
=
sizeof
(
DIDEVICEINSTANCEW
)};
if
(
FAILED
(
IDirectInputDevice8_GetDeviceInfo
(
joy
->
device
,
&
info
)))
continue
;
SendDlgItemMessageW
(
hwnd
,
IDC_TESTSELECTCOMBO
,
CB_ADDSTRING
,
0
,
(
LPARAM
)
info
.
tszInstanceName
);
}
}
static
INT_PTR
CALLBACK
test_dlgproc
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
)
...
...
@@ -956,7 +959,11 @@ static void refresh_ff_joystick_list(HWND hwnd, struct JoystickData *data)
struct
Joystick
*
joy
,
*
joy_end
;
SendDlgItemMessageW
(
hwnd
,
IDC_FFSELECTCOMBO
,
CB_RESETCONTENT
,
0
,
0
);
for
(
joy
=
data
->
joysticks
,
joy_end
=
joy
+
data
->
num_joysticks
;
joy
!=
joy_end
;
++
joy
)
SendDlgItemMessageW
(
hwnd
,
IDC_FFSELECTCOMBO
,
CB_ADDSTRING
,
0
,
(
LPARAM
)
joy
->
instance
.
tszInstanceName
);
{
DIDEVICEINSTANCEW
info
=
{.
dwSize
=
sizeof
(
DIDEVICEINSTANCEW
)};
if
(
FAILED
(
IDirectInputDevice8_GetDeviceInfo
(
joy
->
device
,
&
info
)))
continue
;
SendDlgItemMessageW
(
hwnd
,
IDC_FFSELECTCOMBO
,
CB_ADDSTRING
,
0
,
(
LPARAM
)
info
.
tszInstanceName
);
}
}
static
INT_PTR
CALLBACK
ff_dlgproc
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
)
...
...
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