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
bb9ee1e9
Commit
bb9ee1e9
authored
Feb 06, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Feb 13, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
joy.cpl: Improve the DInput button display with many buttons.
parent
91f7201d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
7 deletions
+9
-7
dinput.c
dlls/joy.cpl/dinput.c
+6
-4
joy.rc
dlls/joy.cpl/joy.rc
+3
-3
No files found.
dlls/joy.cpl/dinput.c
View file @
bb9ee1e9
...
...
@@ -417,7 +417,8 @@ static void draw_button_view( HDC hdc, RECT rect, BOOL set, const WCHAR *name )
SelectObject
(
hdc
,
GetStockObject
(
DC_BRUSH
)
);
SelectObject
(
hdc
,
GetStockObject
(
DC_PEN
)
);
Ellipse
(
hdc
,
rect
.
left
,
rect
.
top
,
rect
.
right
,
rect
.
bottom
);
if
(
rect
.
right
-
rect
.
left
<
16
)
Rectangle
(
hdc
,
rect
.
left
,
rect
.
top
,
rect
.
right
,
rect
.
bottom
);
else
Ellipse
(
hdc
,
rect
.
left
,
rect
.
top
,
rect
.
right
,
rect
.
bottom
);
color
=
SetTextColor
(
hdc
,
GetSysColor
(
set
?
COLOR_HIGHLIGHTTEXT
:
COLOR_WINDOWTEXT
)
);
font
=
SelectObject
(
hdc
,
GetStockObject
(
ANSI_VAR_FONT
)
);
...
...
@@ -559,7 +560,7 @@ LRESULT CALLBACK test_di_buttons_window_proc( HWND hwnd, UINT msg, WPARAM wparam
}
if
(
caps
.
dwButtons
<=
48
)
step
=
16
;
else
step
=
32
;
else
step
=
24
;
hdc
=
BeginPaint
(
hwnd
,
&
paint
);
...
...
@@ -579,7 +580,8 @@ LRESULT CALLBACK test_di_buttons_window_proc( HWND hwnd, UINT msg, WPARAM wparam
for
(
j
=
0
;
j
<
step
&&
i
<
caps
.
dwButtons
;
j
++
,
i
++
)
{
WCHAR
buffer
[
3
];
swprintf
(
buffer
,
ARRAY_SIZE
(
buffer
),
L"%d"
,
i
);
if
(
step
==
24
)
swprintf
(
buffer
,
ARRAY_SIZE
(
buffer
),
L"%02x"
,
i
);
else
swprintf
(
buffer
,
ARRAY_SIZE
(
buffer
),
L"%d"
,
i
);
draw_button_view
(
hdc
,
rect
,
state
.
rgbButtons
[
i
],
buffer
);
OffsetRect
(
&
rect
,
size
,
0
);
}
...
...
@@ -675,7 +677,7 @@ static void create_device_views( HWND hwnd )
GetClientRect
(
parent
,
&
rect
);
rect
.
top
+=
10
;
margin
=
(
rect
.
bottom
-
rect
.
top
)
*
10
/
100
;
margin
=
(
rect
.
bottom
-
rect
.
top
)
*
5
/
100
;
InflateRect
(
&
rect
,
-
margin
,
-
margin
);
CreateWindowW
(
L"JoyCplDInputButtons"
,
NULL
,
WS_CHILD
|
WS_VISIBLE
,
rect
.
left
,
rect
.
top
,
...
...
dlls/joy.cpl/joy.rc
View file @
bb9ee1e9
...
...
@@ -57,9 +57,9 @@ FONT 8, "Ms Shell Dlg"
COMBOBOX IDC_DI_DEVICES, 15, 10, 291, 60, CBS_DROPDOWNLIST | CBS_HASSTRINGS
GROUPBOX "Axes", IDC_DI_AXES, 15, 30, 214, 60
GROUPBOX "POVs", IDC_DI_POVS, 246, 30, 60, 60
GROUPBOX "Buttons", IDC_DI_BUTTONS, 15, 100, 291,
70
LTEXT "Force Feedback Effect", IDC_STATIC, 15, 1
80
, 291, 10
LISTBOX IDC_DI_EFFECTS, 15,
190, 291, 70
, WS_TABSTOP | WS_VSCROLL | LBS_NOTIFY
GROUPBOX "Buttons", IDC_DI_BUTTONS, 15, 100, 291,
86
LTEXT "Force Feedback Effect", IDC_STATIC, 15, 1
96
, 291, 10
LISTBOX IDC_DI_EFFECTS, 15,
206, 291, 54
, WS_TABSTOP | WS_VSCROLL | LBS_NOTIFY
LTEXT "Press any button in the controller to activate the chosen effect. The effect direction can be changed with the controller axis.",
IDC_STATIC, 15, 260, 291, 25
}
...
...
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