From 011d86ed668cbbff5c7bfc5f7e88086acb849921 Mon Sep 17 00:00:00 2001 From: Piotr Dziwinski Date: Sun, 15 Apr 2012 00:50:13 +0200 Subject: Pulled changes from test mingw branch * include fixes * syntax fixes for MinGW * fixed encoding of restext.cpp * temporary fix for MinGW in joystick.cpp Successfully compiles under MinGW :) --- src/joystick.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/joystick.cpp') diff --git a/src/joystick.cpp b/src/joystick.cpp index 29be76f..609a1fb 100644 --- a/src/joystick.cpp +++ b/src/joystick.cpp @@ -79,6 +79,7 @@ BOOL CALLBACK EnumAxesCallback( const DIDEVICEOBJECTINSTANCE* pdidoi, if( FAILED( g_pJoystick->SetProperty( DIPROP_RANGE, &diprg.diph ) ) ) return DIENUM_STOP; +#ifndef __MINGW32__ // FIXME Doesn't work under MinGW // Set the UI to reflect what axes the joystick supports switch( pdidoi->dwOfs ) { @@ -107,6 +108,7 @@ BOOL CALLBACK EnumAxesCallback( const DIDEVICEOBJECTINSTANCE* pdidoi, OutputDebugString("EnumAxesCallback -s1\n"); break; } +#endif return DIENUM_CONTINUE; } @@ -120,8 +122,12 @@ BOOL InitDirectInput(HINSTANCE hInst, HWND hWnd) // Register with the DirectInput subsystem and get a pointer // to a IDirectInput interface we can use. +#ifndef __MINGW32__ // FIXME Doesn't work under MinGW hr = DirectInputCreateEx( hInst, DIRECTINPUT_VERSION,IID_IDirectInput7, (LPVOID*)&g_pDI, NULL ); - if( FAILED(hr) ) return FALSE;; + if( FAILED(hr) ) return FALSE; +#else + return FALSE; +#endif // Look for a simple joystick we can use for this sample program. hr = g_pDI->EnumDevices( DIDEVTYPE_JOYSTICK, EnumJoysticksCallback, -- cgit v1.2.3-1-g7c22