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
f97ba160
Commit
f97ba160
authored
Oct 29, 2002
by
Eric Pouech
Committed by
Alexandre Julliard
Oct 29, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved 16 bit joystick function to mmsystem.c.
parent
50ade2b3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
128 additions
and
123 deletions
+128
-123
joystick.c
dlls/winmm/joystick.c
+1
-123
mmsystem.c
dlls/winmm/mmsystem.c
+127
-0
No files found.
dlls/winmm/joystick.c
View file @
f97ba160
...
...
@@ -35,7 +35,6 @@
#endif
#include "mmsystem.h"
#include "winbase.h"
#include "winnls.h"
#include "wingdi.h"
#include "winuser.h"
...
...
@@ -44,7 +43,7 @@
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
mmsys
);
WINE_DEFAULT_DEBUG_CHANNEL
(
winmm
);
#define MAXJOYSTICK (JOYSTICKID2 + 1)
#define JOY_PERIOD_MIN (10)
/* min Capture time period */
...
...
@@ -135,14 +134,6 @@ UINT WINAPI joyGetNumDevs(void)
}
/**************************************************************************
* joyGetNumDevs [MMSYSTEM.101]
*/
UINT16
WINAPI
joyGetNumDevs16
(
void
)
{
return
joyGetNumDevs
();
}
/**************************************************************************
* joyGetDevCapsA [WINMM.@]
*/
MMRESULT
WINAPI
joyGetDevCapsA
(
UINT
wID
,
LPJOYCAPSA
lpCaps
,
UINT
wSize
)
...
...
@@ -200,46 +191,6 @@ MMRESULT WINAPI joyGetDevCapsW(UINT wID, LPJOYCAPSW lpCaps, UINT wSize)
}
/**************************************************************************
* joyGetDevCaps [MMSYSTEM.102]
*/
MMRESULT16
WINAPI
joyGetDevCaps16
(
UINT16
wID
,
LPJOYCAPS16
lpCaps
,
UINT16
wSize
)
{
JOYCAPSA
jca
;
MMRESULT
ret
=
joyGetDevCapsA
(
wID
,
&
jca
,
sizeof
(
jca
));
if
(
ret
!=
JOYERR_NOERROR
)
return
ret
;
lpCaps
->
wMid
=
jca
.
wMid
;
lpCaps
->
wPid
=
jca
.
wPid
;
strcpy
(
lpCaps
->
szPname
,
jca
.
szPname
);
lpCaps
->
wXmin
=
jca
.
wXmin
;
lpCaps
->
wXmax
=
jca
.
wXmax
;
lpCaps
->
wYmin
=
jca
.
wYmin
;
lpCaps
->
wYmax
=
jca
.
wYmax
;
lpCaps
->
wZmin
=
jca
.
wZmin
;
lpCaps
->
wZmax
=
jca
.
wZmax
;
lpCaps
->
wNumButtons
=
jca
.
wNumButtons
;
lpCaps
->
wPeriodMin
=
jca
.
wPeriodMin
;
lpCaps
->
wPeriodMax
=
jca
.
wPeriodMax
;
if
(
wSize
>=
sizeof
(
JOYCAPS16
))
{
/* Win95 extensions ? */
lpCaps
->
wRmin
=
jca
.
wRmin
;
lpCaps
->
wRmax
=
jca
.
wRmax
;
lpCaps
->
wUmin
=
jca
.
wUmin
;
lpCaps
->
wUmax
=
jca
.
wUmax
;
lpCaps
->
wVmin
=
jca
.
wVmin
;
lpCaps
->
wVmax
=
jca
.
wVmax
;
lpCaps
->
wCaps
=
jca
.
wCaps
;
lpCaps
->
wMaxAxes
=
jca
.
wMaxAxes
;
lpCaps
->
wNumAxes
=
jca
.
wNumAxes
;
lpCaps
->
wMaxButtons
=
jca
.
wMaxButtons
;
strcpy
(
lpCaps
->
szRegKey
,
jca
.
szRegKey
);
strcpy
(
lpCaps
->
szOEMVxD
,
jca
.
szOEMVxD
);
}
return
ret
;
}
/**************************************************************************
* joyGetPosEx [WINMM.@]
*/
MMRESULT
WINAPI
joyGetPosEx
(
UINT
wID
,
LPJOYINFOEX
lpInfo
)
...
...
@@ -265,14 +216,6 @@ MMRESULT WINAPI joyGetPosEx(UINT wID, LPJOYINFOEX lpInfo)
}
/**************************************************************************
* joyGetPosEx [MMSYSTEM.110]
*/
MMRESULT16
WINAPI
joyGetPosEx16
(
UINT16
wID
,
LPJOYINFOEX
lpInfo
)
{
return
joyGetPosEx
(
wID
,
lpInfo
);
}
/**************************************************************************
* joyGetPos [WINMM.@]
*/
MMRESULT
WINAPI
joyGetPos
(
UINT
wID
,
LPJOYINFO
lpInfo
)
...
...
@@ -291,25 +234,6 @@ MMRESULT WINAPI joyGetPos(UINT wID, LPJOYINFO lpInfo)
}
/**************************************************************************
* joyGetPos [MMSYSTEM.103]
*/
MMRESULT16
WINAPI
joyGetPos16
(
UINT16
wID
,
LPJOYINFO16
lpInfo
)
{
JOYINFO
ji
;
MMRESULT
ret
;
TRACE
(
"(%d, %p);
\n
"
,
wID
,
lpInfo
);
if
((
ret
=
joyGetPos
(
wID
,
&
ji
))
==
JOYERR_NOERROR
)
{
lpInfo
->
wXpos
=
ji
.
wXpos
;
lpInfo
->
wYpos
=
ji
.
wYpos
;
lpInfo
->
wZpos
=
ji
.
wZpos
;
lpInfo
->
wButtons
=
ji
.
wButtons
;
}
return
ret
;
}
/**************************************************************************
* joyGetThreshold [WINMM.@]
*/
MMRESULT
WINAPI
joyGetThreshold
(
UINT
wID
,
LPUINT
lpThreshold
)
...
...
@@ -323,19 +247,6 @@ MMRESULT WINAPI joyGetThreshold(UINT wID, LPUINT lpThreshold)
}
/**************************************************************************
* joyGetThreshold [MMSYSTEM.104]
*/
MMRESULT16
WINAPI
joyGetThreshold16
(
UINT16
wID
,
LPUINT16
lpThreshold
)
{
TRACE
(
"(%04X, %p);
\n
"
,
wID
,
lpThreshold
);
if
(
wID
>=
MAXJOYSTICK
)
return
JOYERR_PARMS
;
*
lpThreshold
=
JOY_Sticks
[
wID
].
threshold
;
return
JOYERR_NOERROR
;
}
/**************************************************************************
* joyReleaseCapture [WINMM.@]
*/
MMRESULT
WINAPI
joyReleaseCapture
(
UINT
wID
)
...
...
@@ -354,14 +265,6 @@ MMRESULT WINAPI joyReleaseCapture(UINT wID)
}
/**************************************************************************
* joyReleaseCapture [MMSYSTEM.105]
*/
MMRESULT16
WINAPI
joyReleaseCapture16
(
UINT16
wID
)
{
return
joyReleaseCapture
(
wID
);
}
/**************************************************************************
* joySetCapture [WINMM.@]
*/
MMRESULT
WINAPI
joySetCapture
(
HWND
hWnd
,
UINT
wID
,
UINT
wPeriod
,
BOOL
bChanged
)
...
...
@@ -388,14 +291,6 @@ MMRESULT WINAPI joySetCapture(HWND hWnd, UINT wID, UINT wPeriod, BOOL bChanged)
}
/**************************************************************************
* joySetCapture [MMSYSTEM.106]
*/
MMRESULT16
WINAPI
joySetCapture16
(
HWND16
hWnd
,
UINT16
wID
,
UINT16
wPeriod
,
BOOL16
bChanged
)
{
return
joySetCapture16
(
hWnd
,
wID
,
wPeriod
,
bChanged
);
}
/**************************************************************************
* joySetThreshold [WINMM.@]
*/
MMRESULT
WINAPI
joySetThreshold
(
UINT
wID
,
UINT
wThreshold
)
...
...
@@ -408,20 +303,3 @@ MMRESULT WINAPI joySetThreshold(UINT wID, UINT wThreshold)
return
JOYERR_NOERROR
;
}
/**************************************************************************
* joySetThreshold [MMSYSTEM.107]
*/
MMRESULT16
WINAPI
joySetThreshold16
(
UINT16
wID
,
UINT16
wThreshold
)
{
return
joySetThreshold16
(
wID
,
wThreshold
);
}
/**************************************************************************
* joySetCalibration [MMSYSTEM.109]
*/
MMRESULT16
WINAPI
joySetCalibration16
(
UINT16
wID
)
{
FIXME
(
"(%04X): stub.
\n
"
,
wID
);
return
JOYERR_NOCANDO
;
}
dlls/winmm/mmsystem.c
View file @
f97ba160
...
...
@@ -2965,3 +2965,130 @@ MMRESULT16 WINAPI mmioRename16(LPCSTR szFileName, LPCSTR szNewFileName,
}
return
ret
;
}
/* ###################################################
* # JOYSTICK #
* ###################################################
*/
/**************************************************************************
* joyGetNumDevs [MMSYSTEM.101]
*/
UINT16
WINAPI
joyGetNumDevs16
(
void
)
{
return
joyGetNumDevs
();
}
/**************************************************************************
* joyGetDevCaps [MMSYSTEM.102]
*/
MMRESULT16
WINAPI
joyGetDevCaps16
(
UINT16
wID
,
LPJOYCAPS16
lpCaps
,
UINT16
wSize
)
{
JOYCAPSA
jca
;
MMRESULT
ret
=
joyGetDevCapsA
(
wID
,
&
jca
,
sizeof
(
jca
));
if
(
ret
!=
JOYERR_NOERROR
)
return
ret
;
lpCaps
->
wMid
=
jca
.
wMid
;
lpCaps
->
wPid
=
jca
.
wPid
;
strcpy
(
lpCaps
->
szPname
,
jca
.
szPname
);
lpCaps
->
wXmin
=
jca
.
wXmin
;
lpCaps
->
wXmax
=
jca
.
wXmax
;
lpCaps
->
wYmin
=
jca
.
wYmin
;
lpCaps
->
wYmax
=
jca
.
wYmax
;
lpCaps
->
wZmin
=
jca
.
wZmin
;
lpCaps
->
wZmax
=
jca
.
wZmax
;
lpCaps
->
wNumButtons
=
jca
.
wNumButtons
;
lpCaps
->
wPeriodMin
=
jca
.
wPeriodMin
;
lpCaps
->
wPeriodMax
=
jca
.
wPeriodMax
;
if
(
wSize
>=
sizeof
(
JOYCAPS16
))
{
/* Win95 extensions ? */
lpCaps
->
wRmin
=
jca
.
wRmin
;
lpCaps
->
wRmax
=
jca
.
wRmax
;
lpCaps
->
wUmin
=
jca
.
wUmin
;
lpCaps
->
wUmax
=
jca
.
wUmax
;
lpCaps
->
wVmin
=
jca
.
wVmin
;
lpCaps
->
wVmax
=
jca
.
wVmax
;
lpCaps
->
wCaps
=
jca
.
wCaps
;
lpCaps
->
wMaxAxes
=
jca
.
wMaxAxes
;
lpCaps
->
wNumAxes
=
jca
.
wNumAxes
;
lpCaps
->
wMaxButtons
=
jca
.
wMaxButtons
;
strcpy
(
lpCaps
->
szRegKey
,
jca
.
szRegKey
);
strcpy
(
lpCaps
->
szOEMVxD
,
jca
.
szOEMVxD
);
}
return
ret
;
}
/**************************************************************************
* joyGetPosEx [MMSYSTEM.110]
*/
MMRESULT16
WINAPI
joyGetPosEx16
(
UINT16
wID
,
LPJOYINFOEX
lpInfo
)
{
return
joyGetPosEx
(
wID
,
lpInfo
);
}
/**************************************************************************
* joyGetPos [MMSYSTEM.103]
*/
MMRESULT16
WINAPI
joyGetPos16
(
UINT16
wID
,
LPJOYINFO16
lpInfo
)
{
JOYINFO
ji
;
MMRESULT
ret
;
TRACE
(
"(%d, %p);
\n
"
,
wID
,
lpInfo
);
if
((
ret
=
joyGetPos
(
wID
,
&
ji
))
==
JOYERR_NOERROR
)
{
lpInfo
->
wXpos
=
ji
.
wXpos
;
lpInfo
->
wYpos
=
ji
.
wYpos
;
lpInfo
->
wZpos
=
ji
.
wZpos
;
lpInfo
->
wButtons
=
ji
.
wButtons
;
}
return
ret
;
}
/**************************************************************************
* joyGetThreshold [MMSYSTEM.104]
*/
MMRESULT16
WINAPI
joyGetThreshold16
(
UINT16
wID
,
LPUINT16
lpThreshold
)
{
UINT
t
;
MMRESULT
ret
;
ret
=
joyGetThreshold
(
wID
,
&
t
);
if
(
ret
==
JOYERR_NOERROR
)
*
lpThreshold
=
t
;
return
ret
;
}
/**************************************************************************
* joyReleaseCapture [MMSYSTEM.105]
*/
MMRESULT16
WINAPI
joyReleaseCapture16
(
UINT16
wID
)
{
return
joyReleaseCapture
(
wID
);
}
/**************************************************************************
* joySetCapture [MMSYSTEM.106]
*/
MMRESULT16
WINAPI
joySetCapture16
(
HWND16
hWnd
,
UINT16
wID
,
UINT16
wPeriod
,
BOOL16
bChanged
)
{
return
joySetCapture16
(
hWnd
,
wID
,
wPeriod
,
bChanged
);
}
/**************************************************************************
* joySetThreshold [MMSYSTEM.107]
*/
MMRESULT16
WINAPI
joySetThreshold16
(
UINT16
wID
,
UINT16
wThreshold
)
{
return
joySetThreshold16
(
wID
,
wThreshold
);
}
/**************************************************************************
* joySetCalibration [MMSYSTEM.109]
*/
MMRESULT16
WINAPI
joySetCalibration16
(
UINT16
wID
)
{
FIXME
(
"(%04X): stub.
\n
"
,
wID
);
return
JOYERR_NOCANDO
;
}
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