Fix mismatched arg types in the win32 code (d1x r1.8, key_arch.c r1.2)
authorBradley Bell <btb@icculus.org>
Sat, 22 May 2004 22:58:09 +0000 (22:58 +0000)
committerBradley Bell <btb@icculus.org>
Sat, 22 May 2004 22:58:09 +0000 (22:58 +0000)
ChangeLog
arch/win32/digi.c
arch/win32/key.c

index 6be8487..79c5dcb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2004-05-22  Matthew Mueller  <donut@dakotacom.net>
 
+       * arch/win32/digi.c, arch/win32/key.c: Fix mismatched arg types in
+       the win32 code (d1x r1.8, key_arch.c r1.2)
+
        * arch/ogl/sdlgl.c, arch/ogl/wgl.c, main/inferno.c: made opengl
        use 32bpp screen mode by default, add option to use 16bpp (d1x
        r1.4, r1.16, r1.34)
index 0482cd0..3c117e0 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: digi.c,v 1.9 2004-05-22 07:51:33 btb Exp $ */
+/* $Id: digi.c,v 1.10 2004-05-22 22:58:07 btb Exp $ */
 #define DIGI_SOUND
 #define MIDI_SOUND
 
@@ -178,7 +178,7 @@ static int DS_release_slot(int slot, int kill)
 {
        if (SoundSlots[slot].lpsb)
        {
-               unsigned int s;
+               DWORD s;
 
                IDirectSoundBuffer_GetStatus(SoundSlots[slot].lpsb, &s);
                if (s & DSBSTATUS_PLAYING)
@@ -286,7 +286,7 @@ TryNextChannel:
 
        {
                char *ptr1, *ptr2;
-               int len1, len2;
+               DWORD len1, len2;
 
                IDirectSoundBuffer_Lock(SoundSlots[slot].lpsb, 0, Sounddat(soundnum)->length,
                                        (void **)&ptr1, &len1, (void **)&ptr2, &len2, 0);
@@ -366,7 +366,7 @@ int digi_start_sound_object(int obj)
 
        {
                char *ptr1, *ptr2;
-               int len1, len2;
+               DWORD len1, len2;
 
                IDirectSoundBuffer_Lock(SoundSlots[slot].lpsb, 0, SoundSlots[slot].length,
                                        (void **)&ptr1, &len1, (void **)&ptr2, &len2, 0);
index 19180dd..aeb0948 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: key.c,v 1.2 2004-05-20 22:53:53 btb Exp $ */
+/* $Id: key.c,v 1.3 2004-05-22 22:58:09 btb Exp $ */
 #define WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #include <stdio.h>
@@ -212,7 +212,7 @@ void key_close(void)
 
 HRESULT ReadKey (DIDEVICEOBJECTDATA *pdidod)
 {
-       ULONG cElements = 1;
+       DWORD cElements = 1;
        HRESULT hr;
        if (g_lpdidKeybd == NULL)
                return E_FAIL;
@@ -223,7 +223,7 @@ HRESULT ReadKey (DIDEVICEOBJECTDATA *pdidod)
                        g_lpdidKeybd,
                        sizeof (*pdidod),
                        pdidod,
-                        (int *) &cElements,
+                       &cElements,
                        0);
                if (SUCCEEDED (hr) && cElements != 1)
                        hr = E_FAIL;
@@ -280,14 +280,14 @@ void key_flush()
 {
        if (EnsureInit ())
        {
-               ULONG cElements = INFINITE;
+               DWORD cElements = INFINITE;
                ULONG kcKey;
 //                HRESULT hr =
-                               IDirectInputDevice_GetDeviceData (
-                        g_lpdidKeybd,
+               IDirectInputDevice_GetDeviceData(
+                       g_lpdidKeybd,
                        sizeof (DIDEVICEOBJECTDATA),
                        NULL,
-                        (int *) &cElements,
+                       &cElements,
                        0);
 
                for (kcKey = 0; kcKey < 256; kcKey ++)