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
5e1ca160
Commit
5e1ca160
authored
Apr 24, 2007
by
Andrew Talbot
Committed by
Alexandre Julliard
Apr 24, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Constify some variables.
parent
a60f60ac
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
18 deletions
+18
-18
device.c
dlls/dinput/device.c
+6
-6
device_private.h
dlls/dinput/device_private.h
+5
-5
effect_linuxinput.c
dlls/dinput/effect_linuxinput.c
+6
-6
joystick_linux.c
dlls/dinput/joystick_linux.c
+1
-1
No files found.
dlls/dinput/device.c
View file @
5e1ca160
...
...
@@ -124,14 +124,14 @@ void _dump_DIPROPHEADER(LPCDIPROPHEADER diph) {
}
}
void
_dump_OBJECTINSTANCEA
(
DIDEVICEOBJECTINSTANCEA
*
ddoi
)
{
void
_dump_OBJECTINSTANCEA
(
const
DIDEVICEOBJECTINSTANCEA
*
ddoi
)
{
if
(
TRACE_ON
(
dinput
))
{
DPRINTF
(
" - enumerating : %s ('%s') - %2d - 0x%08x - %s
\n
"
,
debugstr_guid
(
&
ddoi
->
guidType
),
_dump_dinput_GUID
(
&
ddoi
->
guidType
),
ddoi
->
dwOfs
,
ddoi
->
dwType
,
ddoi
->
tszName
);
}
}
void
_dump_OBJECTINSTANCEW
(
DIDEVICEOBJECTINSTANCEW
*
ddoi
)
{
void
_dump_OBJECTINSTANCEW
(
const
DIDEVICEOBJECTINSTANCEW
*
ddoi
)
{
if
(
TRACE_ON
(
dinput
))
{
DPRINTF
(
" - enumerating : %s ('%s'), - %2d - 0x%08x - %s
\n
"
,
debugstr_guid
(
&
ddoi
->
guidType
),
_dump_dinput_GUID
(
&
ddoi
->
guidType
),
ddoi
->
dwOfs
,
ddoi
->
dwType
,
debugstr_w
(
ddoi
->
tszName
));
...
...
@@ -217,7 +217,7 @@ void _dump_DIDATAFORMAT(const DIDATAFORMAT *df) {
}
/* Conversion between internal data buffer and external data buffer */
void
fill_DataFormat
(
void
*
out
,
const
void
*
in
,
DataFormat
*
df
)
{
void
fill_DataFormat
(
void
*
out
,
const
void
*
in
,
const
DataFormat
*
df
)
{
int
i
;
const
char
*
in_c
=
in
;
char
*
out_c
=
(
char
*
)
out
;
...
...
@@ -436,7 +436,7 @@ failed:
}
/* find an object by it's offset in a data format */
static
int
offset_to_object
(
DataFormat
*
df
,
int
offset
)
static
int
offset_to_object
(
const
DataFormat
*
df
,
int
offset
)
{
int
i
;
...
...
@@ -460,14 +460,14 @@ static int id_to_object(LPCDIDATAFORMAT df, int id)
return
-
1
;
}
int
id_to_offset
(
DataFormat
*
df
,
int
id
)
int
id_to_offset
(
const
DataFormat
*
df
,
int
id
)
{
int
obj
=
id_to_object
(
df
->
wine_df
,
id
);
return
obj
>=
0
&&
df
->
offsets
?
df
->
offsets
[
obj
]
:
-
1
;
}
int
find_property
(
DataFormat
*
df
,
LPCDIPROPHEADER
ph
)
int
find_property
(
const
DataFormat
*
df
,
LPCDIPROPHEADER
ph
)
{
switch
(
ph
->
dwHow
)
{
...
...
dlls/dinput/device_private.h
View file @
5e1ca160
...
...
@@ -68,13 +68,13 @@ struct IDirectInputDevice2AImpl
};
/* Routines to do DataFormat / WineFormat conversions */
extern
void
fill_DataFormat
(
void
*
out
,
const
void
*
in
,
DataFormat
*
df
)
;
extern
void
fill_DataFormat
(
void
*
out
,
const
void
*
in
,
const
DataFormat
*
df
)
;
extern
HRESULT
create_DataFormat
(
LPCDIDATAFORMAT
asked_format
,
DataFormat
*
format
);
extern
void
release_DataFormat
(
DataFormat
*
df
)
;
extern
void
queue_event
(
LPDIRECTINPUTDEVICE8A
iface
,
int
ofs
,
DWORD
data
,
DWORD
time
,
DWORD
seq
);
/* Helper functions to work with data format */
extern
int
id_to_offset
(
DataFormat
*
df
,
int
id
);
extern
int
find_property
(
DataFormat
*
df
,
LPCDIPROPHEADER
ph
);
extern
int
id_to_offset
(
const
DataFormat
*
df
,
int
id
);
extern
int
find_property
(
const
DataFormat
*
df
,
LPCDIPROPHEADER
ph
);
/**
* Callback Data used by specific callback
...
...
@@ -92,8 +92,8 @@ extern BOOL DIEnumDevicesCallbackAtoW(LPCDIDEVICEOBJECTINSTANCEA, LPVOID);
extern
void
_dump_cooperativelevel_DI
(
DWORD
dwFlags
)
;
extern
void
_dump_EnumObjects_flags
(
DWORD
dwFlags
)
;
extern
void
_dump_DIPROPHEADER
(
LPCDIPROPHEADER
diph
)
;
extern
void
_dump_OBJECTINSTANCEA
(
DIDEVICEOBJECTINSTANCEA
*
ddoi
)
;
extern
void
_dump_OBJECTINSTANCEW
(
DIDEVICEOBJECTINSTANCEW
*
ddoi
)
;
extern
void
_dump_OBJECTINSTANCEA
(
const
DIDEVICEOBJECTINSTANCEA
*
ddoi
)
;
extern
void
_dump_OBJECTINSTANCEW
(
const
DIDEVICEOBJECTINSTANCEW
*
ddoi
)
;
extern
void
_dump_DIDATAFORMAT
(
const
DIDATAFORMAT
*
df
)
;
extern
const
char
*
_dump_dinput_GUID
(
const
GUID
*
guid
)
;
...
...
dlls/dinput/effect_linuxinput.c
View file @
5e1ca160
...
...
@@ -118,7 +118,7 @@ static void _dump_DIEFFECT_flags(DWORD dwFlags)
}
}
static
void
_dump_DIENVELOPE
(
LPDIENVELOPE
env
)
static
void
_dump_DIENVELOPE
(
LP
C
DIENVELOPE
env
)
{
if
(
env
->
dwSize
!=
sizeof
(
DIENVELOPE
))
{
WARN
(
"Non-standard DIENVELOPE structure size (%d instead of %d).
\n
"
,
...
...
@@ -128,31 +128,31 @@ static void _dump_DIENVELOPE(LPDIENVELOPE env)
env
->
dwAttackLevel
,
env
->
dwAttackTime
,
env
->
dwFadeLevel
,
env
->
dwFadeTime
);
}
static
void
_dump_DICONSTANTFORCE
(
LPDICONSTANTFORCE
frc
)
static
void
_dump_DICONSTANTFORCE
(
LP
C
DICONSTANTFORCE
frc
)
{
TRACE
(
"Constant force has magnitude %d
\n
"
,
frc
->
lMagnitude
);
}
static
void
_dump_DIPERIODIC
(
LPDIPERIODIC
frc
)
static
void
_dump_DIPERIODIC
(
LP
C
DIPERIODIC
frc
)
{
TRACE
(
"Periodic force has magnitude %d, offset %d, phase %d, period %d
\n
"
,
frc
->
dwMagnitude
,
frc
->
lOffset
,
frc
->
dwPhase
,
frc
->
dwPeriod
);
}
static
void
_dump_DIRAMPFORCE
(
LPDIRAMPFORCE
frc
)
static
void
_dump_DIRAMPFORCE
(
LP
C
DIRAMPFORCE
frc
)
{
TRACE
(
"Ramp force has start %d, end %d
\n
"
,
frc
->
lStart
,
frc
->
lEnd
);
}
static
void
_dump_DICONDITION
(
LPDICONDITION
frc
)
static
void
_dump_DICONDITION
(
LP
C
DICONDITION
frc
)
{
TRACE
(
"Condition has offset %d, pos/neg coefficients %d and %d, pos/neg saturations %d and %d, deadband %d
\n
"
,
frc
->
lOffset
,
frc
->
lPositiveCoefficient
,
frc
->
lNegativeCoefficient
,
frc
->
dwPositiveSaturation
,
frc
->
dwNegativeSaturation
,
frc
->
lDeadBand
);
}
static
void
_dump_DICUSTOMFORCE
(
LPDICUSTOMFORCE
frc
)
static
void
_dump_DICUSTOMFORCE
(
LP
C
DICUSTOMFORCE
frc
)
{
unsigned
int
i
;
TRACE
(
"Custom force uses %d channels, sample period %d. Has %d samples at %p.
\n
"
,
...
...
dlls/dinput/joystick_linux.c
View file @
5e1ca160
...
...
@@ -120,7 +120,7 @@ static const GUID DInput_Wine_Joystick_GUID = { /* 9e573ed9-7734-11d2-8d4a-23903
{
0x8d
,
0x4a
,
0x23
,
0x90
,
0x3f
,
0xb6
,
0xbd
,
0xf7
}
};
static
void
_dump_DIDEVCAPS
(
LPDIDEVCAPS
lpDIDevCaps
)
static
void
_dump_DIDEVCAPS
(
const
DIDEVCAPS
*
lpDIDevCaps
)
{
TRACE
(
"dwSize: %d
\n
"
,
lpDIDevCaps
->
dwSize
);
TRACE
(
"dwFlags: %08x
\n
"
,
lpDIDevCaps
->
dwFlags
);
...
...
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