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
a1dd4cb7
Commit
a1dd4cb7
authored
Jan 09, 2007
by
Vitaliy Margolen
Committed by
Alexandre Julliard
Jan 11, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Don't copy no longer used user data format object array.
parent
da78a7af
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
52 deletions
+0
-52
device.c
dlls/dinput/device.c
+0
-52
No files found.
dlls/dinput/device.c
View file @
a1dd4cb7
...
...
@@ -288,8 +288,6 @@ void release_DataFormat(DataFormat * format)
format
->
dt
=
NULL
;
HeapFree
(
GetProcessHeap
(),
0
,
format
->
offsets
);
format
->
offsets
=
NULL
;
if
(
format
->
user_df
)
HeapFree
(
GetProcessHeap
(),
0
,
format
->
user_df
->
rgodf
);
HeapFree
(
GetProcessHeap
(),
0
,
format
->
user_df
);
format
->
user_df
=
NULL
;
}
...
...
@@ -300,48 +298,6 @@ inline LPDIOBJECTDATAFORMAT dataformat_to_odf(LPCDIDATAFORMAT df, int idx)
return
(
LPDIOBJECTDATAFORMAT
)((
LPBYTE
)
df
->
rgodf
+
idx
*
df
->
dwObjSize
);
}
/* Make all instances sequential */
static
void
calculate_ids
(
LPDIDATAFORMAT
df
)
{
int
i
,
axis
=
0
,
pov
=
0
,
button
=
0
;
int
axis_base
,
pov_base
,
button_base
;
DWORD
type
;
/* Make two passes over the format. The first counts the number
* for each type and the second sets the id */
for
(
i
=
0
;
i
<
df
->
dwNumObjs
;
i
++
)
{
type
=
DIDFT_GETTYPE
(
df
->
rgodf
[
i
].
dwType
);
if
(
type
&
DIDFT_AXIS
)
axis
++
;
else
if
(
type
&
DIDFT_POV
)
pov
++
;
else
if
(
type
&
DIDFT_BUTTON
)
button
++
;
}
axis_base
=
0
;
pov_base
=
axis_base
+
axis
;
button_base
=
pov_base
+
pov
;
axis
=
pov
=
button
=
0
;
for
(
i
=
0
;
i
<
df
->
dwNumObjs
;
i
++
)
{
type
=
DIDFT_GETTYPE
(
df
->
rgodf
[
i
].
dwType
);
if
(
type
&
DIDFT_AXIS
)
{
type
|=
DIDFT_MAKEINSTANCE
(
axis_base
+
axis
++
);
TRACE
(
"axis type = 0x%08x
\n
"
,
type
);
}
else
if
(
type
&
DIDFT_POV
)
{
type
|=
DIDFT_MAKEINSTANCE
(
pov_base
+
pov
++
);
TRACE
(
"POV type = 0x%08x
\n
"
,
type
);
}
else
if
(
type
&
DIDFT_BUTTON
)
{
type
|=
DIDFT_MAKEINSTANCE
(
button_base
+
button
++
);
TRACE
(
"button type = 0x%08x
\n
"
,
type
);
}
df
->
rgodf
[
i
].
dwType
=
type
;
}
}
HRESULT
create_DataFormat
(
LPCDIDATAFORMAT
asked_format
,
DataFormat
*
format
)
{
DataTransform
*
dt
;
...
...
@@ -363,10 +319,6 @@ HRESULT create_DataFormat(LPCDIDATAFORMAT asked_format, DataFormat *format)
goto
failed
;
memcpy
(
format
->
user_df
,
asked_format
,
asked_format
->
dwSize
);
if
(
!
(
format
->
user_df
->
rgodf
=
HeapAlloc
(
GetProcessHeap
(),
0
,
asked_format
->
dwNumObjs
*
asked_format
->
dwObjSize
)))
goto
failed
;
memcpy
(
format
->
user_df
->
rgodf
,
asked_format
->
rgodf
,
asked_format
->
dwNumObjs
*
asked_format
->
dwObjSize
);
TRACE
(
"Creating DataTransform :
\n
"
);
for
(
i
=
0
;
i
<
format
->
wine_df
->
dwNumObjs
;
i
++
)
...
...
@@ -469,8 +421,6 @@ HRESULT create_DataFormat(LPCDIDATAFORMAT asked_format, DataFormat *format)
HeapFree
(
GetProcessHeap
(),
0
,
done
);
/* Last step - reset all instances of the new format */
calculate_ids
(
format
->
user_df
);
return
DI_OK
;
failed:
...
...
@@ -479,8 +429,6 @@ failed:
format
->
dt
=
NULL
;
HeapFree
(
GetProcessHeap
(),
0
,
format
->
offsets
);
format
->
offsets
=
NULL
;
if
(
format
->
user_df
)
HeapFree
(
GetProcessHeap
(),
0
,
format
->
user_df
->
rgodf
);
HeapFree
(
GetProcessHeap
(),
0
,
format
->
user_df
);
format
->
user_df
=
NULL
;
...
...
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