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
1e6258d2
Commit
1e6258d2
authored
Dec 23, 2022
by
Tim Clem
Committed by
Alexandre Julliard
Jan 06, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Create object_properties for each mouse axis.
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=53627
parent
b452ebb6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
1 deletion
+22
-1
device.c
dlls/dinput/device.c
+2
-1
mouse.c
dlls/dinput/mouse.c
+20
-0
No files found.
dlls/dinput/device.c
View file @
1e6258d2
...
...
@@ -1063,7 +1063,8 @@ static HRESULT check_property( struct dinput_device *impl, const GUID *guid, con
case
(
DWORD_PTR
)
DIPROP_DEADZONE
:
case
(
DWORD_PTR
)
DIPROP_SATURATION
:
case
(
DWORD_PTR
)
DIPROP_CALIBRATIONMODE
:
if
(
!
impl
->
object_properties
)
return
DIERR_UNSUPPORTED
;
/* not supported on the mouse or keyboard */
if
(
!
(
impl
->
caps
.
dwDevType
&
DIDEVTYPE_HID
))
return
DIERR_UNSUPPORTED
;
break
;
case
(
DWORD_PTR
)
DIPROP_FFLOAD
:
...
...
dlls/dinput/mouse.c
View file @
1e6258d2
...
...
@@ -91,6 +91,17 @@ HRESULT mouse_enum_device( DWORD type, DWORD flags, DIDEVICEINSTANCEW *instance,
return
DI_OK
;
}
static
BOOL
CALLBACK
init_object_properties
(
const
DIDEVICEOBJECTINSTANCEW
*
instance
,
void
*
data
)
{
struct
mouse
*
impl
=
(
struct
mouse
*
)
data
;
struct
object_properties
*
properties
=
impl
->
base
.
object_properties
+
instance
->
dwOfs
/
sizeof
(
LONG
);
properties
->
range_min
=
DIPROPRANGE_NOMIN
;
properties
->
range_max
=
DIPROPRANGE_NOMAX
;
return
DIENUM_CONTINUE
;
}
HRESULT
mouse_create_device
(
struct
dinput
*
dinput
,
const
GUID
*
guid
,
IDirectInputDevice8W
**
out
)
{
struct
mouse
*
impl
;
...
...
@@ -112,6 +123,15 @@ HRESULT mouse_create_device( struct dinput *dinput, const GUID *guid, IDirectInp
impl
->
base
.
caps
.
dwHardwareRevision
=
100
;
impl
->
base
.
dwCoopLevel
=
DISCL_NONEXCLUSIVE
|
DISCL_BACKGROUND
;
/* One object_properties per axis */
impl
->
base
.
object_properties
=
calloc
(
3
,
sizeof
(
struct
object_properties
)
);
if
(
!
impl
->
base
.
object_properties
)
{
IDirectInputDevice_Release
(
&
impl
->
base
.
IDirectInputDevice8W_iface
);
return
E_OUTOFMEMORY
;
}
IDirectInputDevice8_EnumObjects
(
&
impl
->
base
.
IDirectInputDevice8W_iface
,
init_object_properties
,
impl
,
DIDFT_RELAXIS
);
get_app_key
(
&
hkey
,
&
appkey
);
if
(
!
get_config_key
(
hkey
,
appkey
,
L"MouseWarpOverride"
,
buffer
,
sizeof
(
buffer
)
))
{
...
...
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