Difference for arch/win32/key_arch.c from version 1.1 to 1.2


version 1.1 version 1.2
Line 1
 
Line 1
   #define byte w32_byte
 #define WIN32_LEAN_AND_MEAN  #define WIN32_LEAN_AND_MEAN
 #include <windows.h>  #include <windows.h>
 #include <stdio.h>  #include <stdio.h>
 #include <dinput.h>  #include <dinput.h>
   #undef byte
 //#include "inferno.h"  //#include "inferno.h"
 #include "fix.h"  #include "fix.h"
 #include "timer.h"  #include "timer.h"
Line 97
 
Line 99
   
 HRESULT ReadKey (DIDEVICEOBJECTDATA *pdidod)  HRESULT ReadKey (DIDEVICEOBJECTDATA *pdidod)
 {  {
  ULONG cElements = 1;   DWORD cElements = 1;
  HRESULT hr;   HRESULT hr;
  if (g_lpdidKeybd == NULL)   if (g_lpdidKeybd == NULL)
  return E_FAIL;   return E_FAIL;
Line 108
 
Line 110
  g_lpdidKeybd,   g_lpdidKeybd,
  sizeof (*pdidod),   sizeof (*pdidod),
  pdidod,   pdidod,
                         (int *) &cElements,   &cElements,
  0);   0);
  if (SUCCEEDED (hr) && cElements != 1)   if (SUCCEEDED (hr) && cElements != 1)
  hr = E_FAIL;   hr = E_FAIL;
Line 147
 
Line 149
 {  {
  if (EnsureInit ())   if (EnsureInit ())
  {   {
  ULONG cElements = INFINITE;   DWORD cElements = INFINITE;
 //                HRESULT hr =  //                HRESULT hr =
                                IDirectInputDevice_GetDeviceData (                                 IDirectInputDevice_GetDeviceData (
                         g_lpdidKeybd,                          g_lpdidKeybd,
  sizeof (DIDEVICEOBJECTDATA),   sizeof (DIDEVICEOBJECTDATA),
  NULL,   NULL,
                         (int *) &cElements,   &cElements,
  0);   0);
   
  }   }

Legend:
line(s) removed in v.1.1 
line(s) changed
 line(s) added in v.1.2