Moved 16 bit joystick function to mmsystem.c.
This commit is contained in:
parent
50ade2b33d
commit
f97ba160f9
|
@ -35,7 +35,6 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "mmsystem.h"
|
#include "mmsystem.h"
|
||||||
#include "winbase.h"
|
|
||||||
#include "winnls.h"
|
#include "winnls.h"
|
||||||
#include "wingdi.h"
|
#include "wingdi.h"
|
||||||
#include "winuser.h"
|
#include "winuser.h"
|
||||||
|
@ -44,7 +43,7 @@
|
||||||
|
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(mmsys);
|
WINE_DEFAULT_DEBUG_CHANNEL(winmm);
|
||||||
|
|
||||||
#define MAXJOYSTICK (JOYSTICKID2 + 1)
|
#define MAXJOYSTICK (JOYSTICKID2 + 1)
|
||||||
#define JOY_PERIOD_MIN (10) /* min Capture time period */
|
#define JOY_PERIOD_MIN (10) /* min Capture time period */
|
||||||
|
@ -134,14 +133,6 @@ UINT WINAPI joyGetNumDevs(void)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**************************************************************************
|
|
||||||
* joyGetNumDevs [MMSYSTEM.101]
|
|
||||||
*/
|
|
||||||
UINT16 WINAPI joyGetNumDevs16(void)
|
|
||||||
{
|
|
||||||
return joyGetNumDevs();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* joyGetDevCapsA [WINMM.@]
|
* joyGetDevCapsA [WINMM.@]
|
||||||
*/
|
*/
|
||||||
|
@ -199,46 +190,6 @@ MMRESULT WINAPI joyGetDevCapsW(UINT wID, LPJOYCAPSW lpCaps, UINT wSize)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**************************************************************************
|
|
||||||
* 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.@]
|
* joyGetPosEx [WINMM.@]
|
||||||
*/
|
*/
|
||||||
|
@ -264,14 +215,6 @@ MMRESULT WINAPI joyGetPosEx(UINT wID, LPJOYINFOEX lpInfo)
|
||||||
return SendDriverMessage(JOY_Sticks[wID].hDriver, JDD_GETPOSEX, (DWORD)lpInfo, 0L);
|
return SendDriverMessage(JOY_Sticks[wID].hDriver, JDD_GETPOSEX, (DWORD)lpInfo, 0L);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**************************************************************************
|
|
||||||
* joyGetPosEx [MMSYSTEM.110]
|
|
||||||
*/
|
|
||||||
MMRESULT16 WINAPI joyGetPosEx16(UINT16 wID, LPJOYINFOEX lpInfo)
|
|
||||||
{
|
|
||||||
return joyGetPosEx(wID, lpInfo);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* joyGetPos [WINMM.@]
|
* joyGetPos [WINMM.@]
|
||||||
*/
|
*/
|
||||||
|
@ -290,25 +233,6 @@ MMRESULT WINAPI joyGetPos(UINT wID, LPJOYINFO lpInfo)
|
||||||
return SendDriverMessage(JOY_Sticks[wID].hDriver, JDD_GETPOS, (DWORD)lpInfo, 0L);
|
return SendDriverMessage(JOY_Sticks[wID].hDriver, JDD_GETPOS, (DWORD)lpInfo, 0L);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**************************************************************************
|
|
||||||
* 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.@]
|
* joyGetThreshold [WINMM.@]
|
||||||
*/
|
*/
|
||||||
|
@ -322,19 +246,6 @@ MMRESULT WINAPI joyGetThreshold(UINT wID, LPUINT lpThreshold)
|
||||||
return JOYERR_NOERROR;
|
return JOYERR_NOERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**************************************************************************
|
|
||||||
* 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.@]
|
* joyReleaseCapture [WINMM.@]
|
||||||
*/
|
*/
|
||||||
|
@ -353,14 +264,6 @@ MMRESULT WINAPI joyReleaseCapture(UINT wID)
|
||||||
return JOYERR_NOERROR;
|
return JOYERR_NOERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**************************************************************************
|
|
||||||
* joyReleaseCapture [MMSYSTEM.105]
|
|
||||||
*/
|
|
||||||
MMRESULT16 WINAPI joyReleaseCapture16(UINT16 wID)
|
|
||||||
{
|
|
||||||
return joyReleaseCapture(wID);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* joySetCapture [WINMM.@]
|
* joySetCapture [WINMM.@]
|
||||||
*/
|
*/
|
||||||
|
@ -387,14 +290,6 @@ MMRESULT WINAPI joySetCapture(HWND hWnd, UINT wID, UINT wPeriod, BOOL bChanged)
|
||||||
return JOYERR_NOERROR;
|
return JOYERR_NOERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**************************************************************************
|
|
||||||
* joySetCapture [MMSYSTEM.106]
|
|
||||||
*/
|
|
||||||
MMRESULT16 WINAPI joySetCapture16(HWND16 hWnd, UINT16 wID, UINT16 wPeriod, BOOL16 bChanged)
|
|
||||||
{
|
|
||||||
return joySetCapture16(hWnd, wID, wPeriod, bChanged);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* joySetThreshold [WINMM.@]
|
* joySetThreshold [WINMM.@]
|
||||||
*/
|
*/
|
||||||
|
@ -408,20 +303,3 @@ MMRESULT WINAPI joySetThreshold(UINT wID, UINT wThreshold)
|
||||||
|
|
||||||
return JOYERR_NOERROR;
|
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;
|
|
||||||
}
|
|
||||||
|
|
|
@ -2965,3 +2965,130 @@ MMRESULT16 WINAPI mmioRename16(LPCSTR szFileName, LPCSTR szNewFileName,
|
||||||
}
|
}
|
||||||
return ret;
|
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;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue