From 775969a0c2c40999360924ecbba1bb40ddca3110 Mon Sep 17 00:00:00 2001 From: Bradley Bell Date: Wed, 19 May 2004 02:18:19 +0000 Subject: [PATCH] Fix mismatched arg types in the win32 code (d1x r1.7) --- ChangeLog | 4 ++-- arch/win32/mouse.c | 25 ++++++++++++++----------- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index a2a6beab..80efde85 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,7 @@ 2004-05-18 Bradley Bell - * arch/ogl/wgl.c: Fix mismatched arg types in the win32 code (d1x - r1.12) + * arch/ogl/wgl.c, arch/win32/mouse.c: Fix mismatched arg types in + the win32 code (d1x r1.12, r1.7) * arch/linux/hmiplay.c: fix problems with msgbuf struct not being defined (d1x r1.4) diff --git a/arch/win32/mouse.c b/arch/win32/mouse.c index de216aec..dfa2c286 100644 --- a/arch/win32/mouse.c +++ b/arch/win32/mouse.c @@ -12,13 +12,16 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. */ /* * $Source: /cvs/cvsroot/d2x/arch/win32/mouse.c,v $ -* $Revision: 1.1.1.1 $ -* $Author: bradleyb $ -* $Date: 2001-01-19 03:30:15 $ +* $Revision: 1.2 $ +* $Author: btb $ +* $Date: 2004-05-19 02:18:19 $ * * Functions to access Mouse and Cyberman... * * $Log: not supported by cvs2svn $ +* Revision 1.1.1.1 2001/01/19 03:30:15 bradleyb +* Import of d2x-0.0.8 +* * Revision 1.5 1999/10/15 05:27:48 donut * include to fix undef'd err * @@ -220,7 +223,7 @@ extern HWND g_hWnd; HRESULT ReadMouse (DIDEVICEOBJECTDATA *pdidod) { - ULONG cElements = 1; + DWORD cElements = 1; HRESULT hr; if (g_lpdidMouse == NULL) @@ -230,7 +233,7 @@ HRESULT ReadMouse (DIDEVICEOBJECTDATA *pdidod) g_lpdidMouse, sizeof (*pdidod), pdidod, - (int *) &cElements, + &cElements, 0); if (hr == DIERR_INPUTLOST) @@ -242,7 +245,7 @@ HRESULT ReadMouse (DIDEVICEOBJECTDATA *pdidod) g_lpdidMouse, sizeof (*pdidod), pdidod, - (int *) &cElements, + &cElements, 0); } } @@ -341,14 +344,14 @@ void mouse_flush() // _enable(); { - ULONG cElements = INFINITE; + DWORD cElements = INFINITE; // HRESULT hr = - IDirectInputDevice_GetDeviceData ( + IDirectInputDevice_GetDeviceData ( g_lpdidMouse, - sizeof (DIDEVICEOBJECTDATA), + sizeof (DIDEVICEOBJECTDATA), NULL, - (int *) &cElements, - 0); + &cElements, + 0); } } -- 2.39.2