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
c17e06d5
Commit
c17e06d5
authored
Dec 10, 2006
by
Vitaliy Margolen
Committed by
Alexandre Julliard
Dec 11, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: No need to copy default constant format. Use already defined static instead.
parent
a051487d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
19 deletions
+2
-19
joystick_linuxinput.c
dlls/dinput/joystick_linuxinput.c
+2
-19
No files found.
dlls/dinput/joystick_linuxinput.c
View file @
c17e06d5
...
...
@@ -136,7 +136,6 @@ struct JoystickImpl
int
joyfd
;
LPDIDATAFORMAT
internal_df
;
LPDIDATAFORMAT
df
;
DataFormat
*
transform
;
/* wine to user format converter */
int
*
offsets
;
/* object offsets */
...
...
@@ -408,27 +407,13 @@ static JoystickImpl *alloc_device(REFGUID rguid, const void *jvt, IDirectInputIm
goto
FAILED
;
CopyMemory
(
newDevice
->
df
->
rgodf
,
c_dfDIJoystick2
.
rgodf
,
c_dfDIJoystick2
.
dwNumObjs
*
c_dfDIJoystick2
.
dwObjSize
);
/* no do the same for the internal df */
newDevice
->
internal_df
=
HeapAlloc
(
GetProcessHeap
(),
0
,
c_dfDIJoystick2
.
dwSize
);
if
(
newDevice
->
internal_df
==
0
)
goto
FAILED
;
CopyMemory
(
newDevice
->
internal_df
,
&
c_dfDIJoystick2
,
c_dfDIJoystick2
.
dwSize
);
/* copy default objects */
newDevice
->
internal_df
->
rgodf
=
HeapAlloc
(
GetProcessHeap
(),
0
,
c_dfDIJoystick2
.
dwNumObjs
*
c_dfDIJoystick2
.
dwObjSize
);
if
(
newDevice
->
internal_df
->
rgodf
==
0
)
goto
FAILED
;
CopyMemory
(
newDevice
->
internal_df
->
rgodf
,
c_dfDIJoystick2
.
rgodf
,
c_dfDIJoystick2
.
dwNumObjs
*
c_dfDIJoystick2
.
dwObjSize
);
/* create an offsets array */
newDevice
->
offsets
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
c_dfDIJoystick2
.
dwNumObjs
*
sizeof
(
int
));
if
(
newDevice
->
offsets
==
0
)
goto
FAILED
;
calculate_ids
(
newDevice
->
internal_df
);
/* create the default transform filter */
newDevice
->
transform
=
create_DataFormat
(
newDevice
->
internal_df
,
newDevice
->
df
,
newDevice
->
offsets
);
newDevice
->
transform
=
create_DataFormat
(
&
c_dfDIJoystick2
,
newDevice
->
df
,
newDevice
->
offsets
);
calculate_ids
(
newDevice
->
df
);
return
newDevice
;
...
...
@@ -436,8 +421,6 @@ static JoystickImpl *alloc_device(REFGUID rguid, const void *jvt, IDirectInputIm
FAILED:
HeapFree
(
GetProcessHeap
(),
0
,
newDevice
->
df
->
rgodf
);
HeapFree
(
GetProcessHeap
(),
0
,
newDevice
->
df
);
HeapFree
(
GetProcessHeap
(),
0
,
newDevice
->
internal_df
->
rgodf
);
HeapFree
(
GetProcessHeap
(),
0
,
newDevice
->
internal_df
);
HeapFree
(
GetProcessHeap
(),
0
,
newDevice
);
return
NULL
;
}
...
...
@@ -593,7 +576,7 @@ static HRESULT WINAPI JoystickAImpl_SetDataFormat(
}
memcpy
(
This
->
df
->
rgodf
,
df
->
rgodf
,
df
->
dwNumObjs
*
df
->
dwObjSize
);
This
->
transform
=
create_DataFormat
(
This
->
internal_df
,
This
->
df
,
This
->
offsets
);
This
->
transform
=
create_DataFormat
(
&
c_dfDIJoystick2
,
This
->
df
,
This
->
offsets
);
calculate_ids
(
This
->
df
);
return
DI_OK
;
...
...
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