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
3223798d
Commit
3223798d
authored
Apr 19, 2009
by
Vitaliy Margolen
Committed by
Alexandre Julliard
Apr 20, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Make props array a part of the generic joystick struct.
It's much easier to free it on release.
parent
aee42377
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
13 deletions
+3
-13
joystick_linux.c
dlls/dinput/joystick_linux.c
+0
-6
joystick_osx.c
dlls/dinput/joystick_osx.c
+0
-6
joystick_private.h
dlls/dinput/joystick_private.h
+3
-1
No files found.
dlls/dinput/joystick_linux.c
View file @
3223798d
...
...
@@ -462,11 +462,6 @@ static HRESULT alloc_device(REFGUID rguid, const void *jvt, IDirectInputImpl *di
}
newDevice
->
generic
.
base
.
data_format
.
wine_df
=
df
;
/* create default properties */
newDevice
->
generic
.
props
=
HeapAlloc
(
GetProcessHeap
(),
0
,
c_dfDIJoystick2
.
dwNumObjs
*
sizeof
(
ObjProps
));
if
(
newDevice
->
generic
.
props
==
0
)
goto
FAILED
;
/* initialize default properties */
for
(
i
=
0
;
i
<
c_dfDIJoystick2
.
dwNumObjs
;
i
++
)
{
newDevice
->
generic
.
props
[
i
].
lDevMin
=
-
32767
;
...
...
@@ -510,7 +505,6 @@ FAILED1:
release_DataFormat
(
&
newDevice
->
generic
.
base
.
data_format
);
HeapFree
(
GetProcessHeap
(),
0
,
newDevice
->
axis_map
);
HeapFree
(
GetProcessHeap
(),
0
,
newDevice
->
generic
.
name
);
HeapFree
(
GetProcessHeap
(),
0
,
newDevice
->
generic
.
props
);
HeapFree
(
GetProcessHeap
(),
0
,
newDevice
);
*
pdev
=
0
;
...
...
dlls/dinput/joystick_osx.c
View file @
3223798d
...
...
@@ -724,11 +724,6 @@ static HRESULT alloc_device(REFGUID rguid, const void *jvt, IDirectInputImpl *di
}
newDevice
->
generic
.
base
.
data_format
.
wine_df
=
df
;
/* create default properties */
newDevice
->
generic
.
props
=
HeapAlloc
(
GetProcessHeap
(),
0
,
c_dfDIJoystick2
.
dwNumObjs
*
sizeof
(
ObjProps
));
if
(
newDevice
->
generic
.
props
==
0
)
goto
FAILED
;
/* initialize default properties */
get_osx_device_elements_props
(
newDevice
);
...
...
@@ -761,7 +756,6 @@ FAILED:
HeapFree
(
GetProcessHeap
(),
0
,
df
);
release_DataFormat
(
&
newDevice
->
generic
.
base
.
data_format
);
HeapFree
(
GetProcessHeap
(),
0
,
newDevice
->
generic
.
name
);
HeapFree
(
GetProcessHeap
(),
0
,
newDevice
->
generic
.
props
);
HeapFree
(
GetProcessHeap
(),
0
,
newDevice
);
*
pdev
=
0
;
...
...
dlls/dinput/joystick_private.h
View file @
3223798d
...
...
@@ -29,6 +29,8 @@
#include "dinput_private.h"
#include "device_private.h"
/* Number of objects in the default data format */
#define MAX_PROPS 164
struct
JoystickGenericImpl
;
typedef
void
joy_polldev_handler
(
struct
JoystickGenericImpl
*
This
);
...
...
@@ -37,7 +39,7 @@ typedef struct JoystickGenericImpl
{
struct
IDirectInputDevice2AImpl
base
;
ObjProps
*
props
;
ObjProps
props
[
MAX_PROPS
]
;
DIDEVCAPS
devcaps
;
DIJOYSTATE2
js
;
/* wine data */
GUID
guidProduct
;
...
...
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