diff --git a/DirectInput/CustomFormat.png b/DirectInput/CustomFormat.png new file mode 100644 index 00000000..acdf4303 Binary files /dev/null and b/DirectInput/CustomFormat.png differ diff --git a/DirectInput/Joystick/joystick.cpp b/DirectInput/Joystick/joystick.cpp index 2c17d1f6..7aeb8a0e 100644 --- a/DirectInput/Joystick/joystick.cpp +++ b/DirectInput/Joystick/joystick.cpp @@ -42,18 +42,9 @@ BOOL CALLBACK EnumJoysticksCallback( const DIDEVICEINSTANCE* pdidInstance, VO HRESULT InitDirectInput( HWND hDlg ); VOID FreeDirectInput(); HRESULT UpdateInputState( HWND hDlg ); +VOID FillJoystickInfo(HWND hDlg); -// Stuff to filter out XInput devices -#include -HRESULT SetupForIsXInputDevice(); -bool IsXInputDevice( const GUID* pGuidProductFromDirectInput ); -void CleanupForIsXInputDevice(); - -struct XINPUT_DEVICE_NODE -{ - DWORD dwVidPid; - XINPUT_DEVICE_NODE* pNext; -}; +bool IsXInputDevice( LPDIRECTINPUTDEVICE8 pJoystick ); struct DI_ENUM_CONTEXT { @@ -62,7 +53,6 @@ struct DI_ENUM_CONTEXT }; bool g_bFilterOutXinputDevices = false; -XINPUT_DEVICE_NODE* g_pXInputDeviceList = nullptr; @@ -78,7 +68,6 @@ LPDIRECTINPUTDEVICE8 g_pJoystick = nullptr; - //----------------------------------------------------------------------------- // Name: WinMain() // Desc: Entry point for the application. Since we use a simple dialog for @@ -199,9 +188,6 @@ HRESULT InitDirectInput( HWND hDlg ) return hr; - if( g_bFilterOutXinputDevices ) - SetupForIsXInputDevice(); - DIJOYCONFIG PreferredJoyCfg = {0}; DI_ENUM_CONTEXT enumContext; enumContext.pPreferredJoyCfg = &PreferredJoyCfg; @@ -222,9 +208,6 @@ HRESULT InitDirectInput( HWND hDlg ) &enumContext, DIEDFL_ATTACHEDONLY ) ) ) return hr; - if( g_bFilterOutXinputDevices ) - CleanupForIsXInputDevice(); - // Make sure we got a joystick if( !g_pJoystick ) { @@ -256,169 +239,100 @@ HRESULT InitDirectInput( HWND hDlg ) ( VOID* )hDlg, DIDFT_ALL ) ) ) return hr; + FillJoystickInfo( hDlg ); + return S_OK; } //----------------------------------------------------------------------------- -// Enum each PNP device using WMI and check each device ID to see if it contains -// "IG_" (ex. "VID_045E&PID_028E&IG_00"). If it does, then it's an XInput device -// Unfortunately this information can not be found by just using DirectInput. -// Checking against a VID/PID of 0x028E/0x045E won't find 3rd party or future -// XInput devices. -// -// This function stores the list of xinput devices in a linked list -// at g_pXInputDeviceList, and IsXInputDevice() searchs that linked list +// Returns true if the DirectInput device is also an XInput device. +// Checks if device ID contains "IG_" (ex. "\\?\HID#VID_045E&PID_02A1&IG_00"). +// If it does, then it's an XInput device. //----------------------------------------------------------------------------- -HRESULT SetupForIsXInputDevice() +bool IsXInputDevice( LPDIRECTINPUTDEVICE8 pJoystick ) { - IWbemServices* pIWbemServices = nullptr; - IEnumWbemClassObject* pEnumDevices = nullptr; - IWbemLocator* pIWbemLocator = nullptr; - IWbemClassObject* pDevices[20] = {0}; - BSTR bstrDeviceID = nullptr; - BSTR bstrClassName = nullptr; - BSTR bstrNamespace = nullptr; - DWORD uReturned = 0; - bool bCleanupCOM = false; - UINT iDevice = 0; - VARIANT var; - HRESULT hr; + DIPROPGUIDANDPATH dip; + dip.diph.dwSize = sizeof( DIPROPGUIDANDPATH ); + dip.diph.dwHeaderSize = sizeof( DIPROPHEADER ); + dip.diph.dwObj = 0; + dip.diph.dwHow = DIPH_DEVICE; - // CoInit if needed - hr = CoInitialize( nullptr ); - bCleanupCOM = SUCCEEDED( hr ); - - // Create WMI - hr = CoCreateInstance( __uuidof( WbemLocator ), - nullptr, - CLSCTX_INPROC_SERVER, - __uuidof( IWbemLocator ), - ( LPVOID* )&pIWbemLocator ); - if( FAILED( hr ) || pIWbemLocator == nullptr ) - goto LCleanup; - - // Create BSTRs for WMI - bstrNamespace = SysAllocString( L"\\\\.\\root\\cimv2" ); if( bstrNamespace == nullptr ) goto LCleanup; - bstrDeviceID = SysAllocString( L"DeviceID" ); if( bstrDeviceID == nullptr ) goto LCleanup; - bstrClassName = SysAllocString( L"Win32_PNPEntity" ); if( bstrClassName == nullptr ) goto LCleanup; - - // Connect to WMI - hr = pIWbemLocator->ConnectServer( bstrNamespace, nullptr, nullptr, 0L, - 0L, nullptr, nullptr, &pIWbemServices ); - if( FAILED( hr ) || pIWbemServices == nullptr ) - goto LCleanup; - - // Switch security level to IMPERSONATE - (void)CoSetProxyBlanket( pIWbemServices, RPC_C_AUTHN_WINNT, RPC_C_AUTHZ_NONE, nullptr, - RPC_C_AUTHN_LEVEL_CALL, RPC_C_IMP_LEVEL_IMPERSONATE, nullptr, 0 ); - - // Get list of Win32_PNPEntity devices - hr = pIWbemServices->CreateInstanceEnum( bstrClassName, 0, nullptr, &pEnumDevices ); - if( FAILED( hr ) || pEnumDevices == nullptr ) - goto LCleanup; - - // Loop over all devices - for(; ; ) - { - // Get 20 at a time - hr = pEnumDevices->Next( 10000, 20, pDevices, &uReturned ); - if( FAILED( hr ) ) - goto LCleanup; - if( uReturned == 0 ) - break; - - for( iDevice = 0; iDevice < uReturned; iDevice++ ) - { - if ( !pDevices[iDevice] ) - continue; + if ( FAILED( pJoystick->GetProperty( DIPROP_GUIDANDPATH, &dip.diph ) ) ) + return false; - // For each device, get its device ID - hr = pDevices[iDevice]->Get( bstrDeviceID, 0L, &var, nullptr, nullptr ); - if( SUCCEEDED( hr ) && var.vt == VT_BSTR && var.bstrVal != nullptr ) - { - // Check if the device ID contains "IG_". If it does, then it's an XInput device - // Unfortunately this information can not be found by just using DirectInput - if( wcsstr( var.bstrVal, L"IG_" ) ) - { - // If it does, then get the VID/PID from var.bstrVal - DWORD dwPid = 0, dwVid = 0; - WCHAR* strVid = wcsstr( var.bstrVal, L"VID_" ); - if( strVid && swscanf( strVid, L"VID_%4X", &dwVid ) != 1 ) - dwVid = 0; - WCHAR* strPid = wcsstr( var.bstrVal, L"PID_" ); - if( strPid && swscanf( strPid, L"PID_%4X", &dwPid ) != 1 ) - dwPid = 0; - - DWORD dwVidPid = MAKELONG( dwVid, dwPid ); - - // Add the VID/PID to a linked list - XINPUT_DEVICE_NODE* pNewNode = new XINPUT_DEVICE_NODE; - if( pNewNode ) - { - pNewNode->dwVidPid = dwVidPid; - pNewNode->pNext = g_pXInputDeviceList; - g_pXInputDeviceList = pNewNode; - } - } - } - SAFE_RELEASE( pDevices[iDevice] ); - } - } + _wcsupr( dip.wszPath ); -LCleanup: - if( bstrNamespace ) - SysFreeString( bstrNamespace ); - if( bstrDeviceID ) - SysFreeString( bstrDeviceID ); - if( bstrClassName ) - SysFreeString( bstrClassName ); - for( iDevice = 0; iDevice < 20; iDevice++ ) - SAFE_RELEASE( pDevices[iDevice] ); - SAFE_RELEASE( pEnumDevices ); - SAFE_RELEASE( pIWbemLocator ); - SAFE_RELEASE( pIWbemServices ); - - return hr; + return wcsstr( dip.wszPath, L"IG_" ); } - -//----------------------------------------------------------------------------- -// Returns true if the DirectInput device is also an XInput device. -// Call SetupForIsXInputDevice() before, and CleanupForIsXInputDevice() after -//----------------------------------------------------------------------------- -bool IsXInputDevice( const GUID* pGuidProductFromDirectInput ) +VOID FillJoystickInfo( HWND hDlg ) { - // Check each xinput device to see if this device's vid/pid matches - XINPUT_DEVICE_NODE* pNode = g_pXInputDeviceList; - while( pNode ) - { - if( pNode->dwVidPid == pGuidProductFromDirectInput->Data1 ) - return true; - pNode = pNode->pNext; - } - - return false; + TCHAR strJoysInfo[512] = { 0 }; + + DIDEVICEINSTANCE pdidInstance; + pdidInstance.dwSize = sizeof(pdidInstance); + + if ( FAILED ( g_pJoystick->GetDeviceInfo( &pdidInstance ) ) ) + return; + + DIPROPDWORD dipdw; + dipdw.diph.dwSize = sizeof(DIPROPDWORD); + dipdw.diph.dwHeaderSize = sizeof(DIPROPHEADER); + dipdw.diph.dwObj = 0; + dipdw.diph.dwHow = DIPH_DEVICE; + + if ( FAILED( g_pJoystick->GetProperty( DIPROP_VIDPID, &dipdw.diph ) ) ) + return; + + WORD wVendorID = LOWORD( dipdw.dwData ); + WORD wProductID = HIWORD( dipdw.dwData ); + + DIPROPGUIDANDPATH dip; + dip.diph.dwSize = sizeof(DIPROPGUIDANDPATH); + dip.diph.dwHeaderSize = sizeof(DIPROPHEADER); + dip.diph.dwObj = 0; + dip.diph.dwHow = DIPH_DEVICE; + + if (FAILED( g_pJoystick->GetProperty( DIPROP_GUIDANDPATH, &dip.diph ) ) ) + return; + + WCHAR* wszPath = dip.wszPath; + + TCHAR strGuidProduct[64] = { 0 }; + TCHAR strGuidInstance[64] = { 0 }; + TCHAR strGuidClass[64] = { 0 }; + + StringFromGUID2(pdidInstance.guidProduct, strGuidProduct, 64); + StringFromGUID2(pdidInstance.guidInstance, strGuidInstance, 64); + StringFromGUID2(dip.guidClass, strGuidClass, 64); + + _stprintf_s(strJoysInfo, 512, + L"Product Name: %s\n" + L"Instance Name: %s\n" + L"Vendor ID: 0x%04x\n" + L"Product ID: 0x%04x\n" + L"Product GUID: %s\n" + L"Instance GUID: %s\n" + L"HID Class GUID: %s\n" + L"HID Usage Page: 0x%04x\n" + L"HID Usage ID: 0x%04x\n" + L"HID Path: %s", + pdidInstance.tszProductName, + pdidInstance.tszInstanceName, + wVendorID, + wProductID, + strGuidProduct, + strGuidInstance, + strGuidClass, + pdidInstance.wUsagePage, + pdidInstance.wUsage, + dip.wszPath); + + EnableWindow(GetDlgItem(hDlg, IDC_INFO), TRUE); + SetWindowText(GetDlgItem(hDlg, IDC_INFO), strJoysInfo); } - -//----------------------------------------------------------------------------- -// Cleanup needed for IsXInputDevice() -//----------------------------------------------------------------------------- -void CleanupForIsXInputDevice() -{ - // Cleanup linked list - XINPUT_DEVICE_NODE* pNode = g_pXInputDeviceList; - while( pNode ) - { - XINPUT_DEVICE_NODE* pDelete = pNode; - pNode = pNode->pNext; - SAFE_DELETE( pDelete ); - } -} - - - //----------------------------------------------------------------------------- // Name: EnumJoysticksCallback() // Desc: Called once for each enumerated joystick. If we find one, create a @@ -430,9 +344,6 @@ BOOL CALLBACK EnumJoysticksCallback( const DIDEVICEINSTANCE* pdidInstance, auto pEnumContext = reinterpret_cast( pContext ); HRESULT hr; - if( g_bFilterOutXinputDevices && IsXInputDevice( &pdidInstance->guidProduct ) ) - return DIENUM_CONTINUE; - // Skip anything other than the perferred joystick device as defined by the control panel. // Instead you could store all the enumerated joysticks and let the user pick. if( pEnumContext->bPreferredJoyCfgValid && @@ -447,6 +358,12 @@ BOOL CALLBACK EnumJoysticksCallback( const DIDEVICEINSTANCE* pdidInstance, if( FAILED( hr ) ) return DIENUM_CONTINUE; + if (g_bFilterOutXinputDevices && IsXInputDevice( g_pJoystick )) + { + SAFE_RELEASE( g_pJoystick ); + return DIENUM_CONTINUE; + } + // Stop enumeration. Note: we're just taking the first joystick we get. You // could store all the enumerated joysticks and let the user pick. return DIENUM_STOP; diff --git a/DirectInput/Joystick/joystick.rc b/DirectInput/Joystick/joystick.rc index f9819861..0bafa4f8 100644 --- a/DirectInput/Joystick/joystick.rc +++ b/DirectInput/Joystick/joystick.rc @@ -27,45 +27,45 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // Dialog // -IDD_JOYST_IMM DIALOG DISCARDABLE 0, 0, 190, 182 +IDD_JOYST_IMM DIALOG DISCARDABLE 0, 0, 425, 179 STYLE DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "DirectInput Joystick Sample " FONT 8, "MS Shell Dlg" BEGIN - DEFPUSHBUTTON "E&xit",IDCANCEL,156,161,27,14 - LTEXT "between updates is lost.",IDC_STATIC,7,25,153,8 - LTEXT "This sample polls the joystick 30 times a second.", - IDC_STATIC,7,7,153,8 - LTEXT "When using immediate mode, joystick data",IDC_STATIC,7, - 17,153,8 - LTEXT "X Axis:",IDC_X_AXIS_TEXT,18,56,22,8,WS_DISABLED - LTEXT "Y Axis:",IDC_Y_AXIS_TEXT,18,67,22,8,WS_DISABLED - LTEXT "Z Axis:",IDC_Z_AXIS_TEXT,18,78,22,8,WS_DISABLED - LTEXT "Buttons:",IDC_STATIC,18,137,27,8 - LTEXT "X Rotation:",IDC_X_ROT_TEXT,18,93,36,8,WS_DISABLED - LTEXT "POV 0:",IDC_POV0_TEXT,100,82,24,8,WS_DISABLED - GROUPBOX "Joystick State",IDC_STATIC,7,41,176,112 - LTEXT "0",IDC_X_AXIS,63,56,21,8,WS_DISABLED - LTEXT "0",IDC_Y_AXIS,63,67,21,8,WS_DISABLED - LTEXT "0",IDC_Z_AXIS,63,78,21,8,WS_DISABLED - LTEXT "",IDC_BUTTONS,54,137,120,8 - LTEXT "0",IDC_X_ROT,63,93,21,8,WS_DISABLED - LTEXT "0",IDC_POV0,135,82,21,8,WS_DISABLED - LTEXT "Y Rotation:",IDC_Y_ROT_TEXT,18,104,36,8,WS_DISABLED - LTEXT "0",IDC_Y_ROT,63,104,21,8,WS_DISABLED - LTEXT "Z Rotation:",IDC_Z_ROT_TEXT,18,115,36,8,WS_DISABLED - LTEXT "0",IDC_Z_ROT,63,115,21,8,WS_DISABLED - LTEXT "Slider 0:",IDC_SLIDER0_TEXT,100,56,26,8,WS_DISABLED - LTEXT "0",IDC_SLIDER0,135,56,21,8,WS_DISABLED - LTEXT "Slider 1:",IDC_SLIDER1_TEXT,100,67,26,8,WS_DISABLED - LTEXT "0",IDC_SLIDER1,135,67,21,8,WS_DISABLED - LTEXT "POV 1:",IDC_POV1_TEXT,100,93,24,8,WS_DISABLED - LTEXT "0",IDC_POV1,135,93,21,8,WS_DISABLED - LTEXT "POV 2:",IDC_POV2_TEXT,100,104,24,8,WS_DISABLED - LTEXT "0",IDC_POV2,135,104,21,8,WS_DISABLED - LTEXT "POV 3:",IDC_POV3_TEXT,100,115,24,8,WS_DISABLED - LTEXT "0",IDC_POV3,135,115,21,8,WS_DISABLED + DEFPUSHBUTTON "E&xit", IDCANCEL, 391, 159, 27, 14, 0 + LTEXT "between updates is lost.", IDC_STATIC, 7, 25, 153, 8 + LTEXT "This sample polls the joystick 30 times a second.", IDC_STATIC, 7, 7, 153, 8 + LTEXT "When using immediate mode,joystick data", IDC_STATIC, 7, 17, 153, 8 + LTEXT "X Axis:", IDC_X_AXIS_TEXT, 16, 57, 22, 8, WS_DISABLED + LTEXT "Y Axis:", IDC_Y_AXIS_TEXT, 16, 68, 22, 8, WS_DISABLED + LTEXT "Z Axis:", IDC_Z_AXIS_TEXT, 16, 79, 22, 8, WS_DISABLED + LTEXT "Buttons:", IDC_STATIC, 16, 138, 27, 8 + LTEXT "X Rotation:", IDC_X_ROT_TEXT, 16, 94, 36, 8, WS_DISABLED + LTEXT "POV 0:", IDC_POV0_TEXT, 98, 83, 24, 8, WS_DISABLED + GROUPBOX "Joystick State", IDC_STATIC, 5, 42, 176, 112, 0 + LTEXT "0", IDC_X_AXIS, 61, 57, 32, 8, WS_DISABLED + LTEXT "0", IDC_Y_AXIS, 61, 68, 32, 8, WS_DISABLED + LTEXT "0", IDC_Z_AXIS, 61, 79, 32, 8, WS_DISABLED + LTEXT "", IDC_BUTTONS, 52, 138, 120, 8 + LTEXT "0", IDC_X_ROT, 61, 94, 32, 8, WS_DISABLED + LTEXT "0", IDC_POV0, 133, 83, 32, 8, WS_DISABLED + LTEXT "Y Rotation:", IDC_Y_ROT_TEXT, 16, 105, 36, 8, WS_DISABLED + LTEXT "0", IDC_Y_ROT, 61, 105, 32, 8, WS_DISABLED + LTEXT "Z Rotation:", IDC_Z_ROT_TEXT, 16, 116, 36, 8, WS_DISABLED + LTEXT "0", IDC_Z_ROT, 61, 116, 32, 8, WS_DISABLED + LTEXT "Slider 0:", IDC_SLIDER0_TEXT, 98, 57, 26, 8, WS_DISABLED + LTEXT "0", IDC_SLIDER0, 133, 57, 32, 8, WS_DISABLED + LTEXT "Slider 1:", IDC_SLIDER1_TEXT, 98, 68, 26, 8, WS_DISABLED + LTEXT "0", IDC_SLIDER1, 133, 68, 32, 8, WS_DISABLED + LTEXT "POV 1:", IDC_POV1_TEXT, 98, 94, 24, 8, WS_DISABLED + LTEXT "0", IDC_POV1, 133, 94, 32, 8, WS_DISABLED + LTEXT "POV 2:", IDC_POV2_TEXT, 98, 105, 24, 8, WS_DISABLED + LTEXT "0", IDC_POV2, 133, 105, 32, 8, WS_DISABLED + LTEXT "POV 3:", IDC_POV3_TEXT, 98, 116, 24, 8, WS_DISABLED + LTEXT "0", IDC_POV3, 133, 116, 32, 8, WS_DISABLED + GROUPBOX "Joystick Info", IDC_STATIC, 189, 43, 228, 111, 0 + LTEXT "Not connected", IDC_INFO, 198, 53, 215, 99, WS_DISABLED END diff --git a/DirectInput/Joystick/resource.h b/DirectInput/Joystick/resource.h index 5fa901ab..a511d622 100644 --- a/DirectInput/Joystick/resource.h +++ b/DirectInput/Joystick/resource.h @@ -32,6 +32,7 @@ #define IDC_POV1 1042 #define IDC_POV2 1043 #define IDC_POV3 1044 +#define IDC_INFO 1045 // Next default values for new objects // diff --git a/DirectInput/README.md b/DirectInput/README.md new file mode 100644 index 00000000..757fc1de --- /dev/null +++ b/DirectInput/README.md @@ -0,0 +1,82 @@ +# DirectInput Samples + +[https://github.com/walbourn/directx-sdk-samples](https://github.com/walbourn/directx-sdk-samples) + +This is the DirectX SDK's Direct3D 11 sample updated to use Visual Studio 2012 and the Windows SDK 8.0 without any dependencies on legacy DirectX SDK content. This sample is a Win32 desktop DirectX 11.0 application for Windows 10, Windows 8.1, Windows 8, Windows 7, and Windows Vista Service Pack 2 with the DirectX 11.0 runtime. + +**This is based on the legacy DirectX SDK (June 2010) Win32 desktop sample. This is not intended for use with Windows Store apps, Windows RT, or universal Windows apps.** + +The DirectInput API is not available for Windows Store apps or on Windows RT (aka Windows on ARM). The Xbox 360 Common Controller and the XINPUT API is the recommended solution for modern game controllers and is supported on these platforms. + +The DirectInput API is not recommended for use for traditional mouse and keyboard data, and use of standard Win32 messages is preferred. This is why the older DirectX SDK samples "Keyboard" and "Mouse" are not included in the latest DirectX SDK or this package. + +The DirectInput API's remaining utility is for driving HID-only game controllers, haptic devices, and custom force-feedback devices. + +Description +=========== + +CustomFormat +------------ + +![CustomFormat.png](CustomFormat.png) + +This sample illustrates the use of a custom data format. + +**Note:** If your mouse has more than four buttons, not all of the buttons will be used by this sample. + +The comments in CustomFormat.cpp explain how to create, initialize, and retrieve data with a custom data format. You might want to use a custom data format for adding support for a non-standard input device. By enumerating the device objects, you can determine exactly what data is available. The data format you create specifies how the data you are interested in will be stored. + +For compatibility, this sample creates a new format to store mouse data. Usually, you would want to use one of the provided c\_dfDIMouse types, but the steps taken to create the custom format will be the same for any hardware device. For more information, see IDirectInputDevice8::SetDataFormat. + +FFCont +------ + +![ffconst.png](ffconst.png) + +The FFConst sample program applies raw forces to a force-feedback input device, illustrating how a simulator-type application can use force feedback to generate forces computed by a physics engine. + +You must have a force-feedback device connected to your system in order to run the application. + +When you run the application, it displays a window with a crosshair and a black spot in it. Click anywhere within the window's client area to move the black spot. (Note that moving the device itself does not do anything.) FFConst exerts a constant force on the device from the direction of the spot, in proportion to the distance from the crosshair. You can also hold down the mouse button and move the spot continuously. + +This sample program enumerates the input devices and acquires the first force-feedback device that it finds. If none are detected, it displays a message and terminates. + +When the user moves the black spot, joySetForcesXY function converts the cursor coordinates to a force direction and magnitude. This data is used to modify the parameters of the constant force effect. + +Joystick +-------- + +![joystick.png](joystick.png) + +The Joystick sample program obtains and displays joystick data. + +The application polls the joystick for immediate data in response to a timer set inside the dialog procedure. + +Building for Windows XP +======================= + +The DirectInput legacy API is available on Windows XP, so this sample can be built using Visual Studio 2012 with the Windows XP compatible Platform Toolset "v110\_xp" included with _Visual Studio 2012 Update 1_. Remove the link references to `DXGUID.LIB`. You will need to locally define the required GUIDs by using `#define INITGUID` before including `dinput.h` in one of the modules. + +Notes +===== + +* These samples use DirectInput8. The DirectInput7 API is not supported for x64 native applications. The Windows 8.0 SDK only includes the DirectInput8 link library (`dinput8.lib`), and DirectInput7 was last supported by the DirectX SDK (August 2007) release. + +* The Xbox 360 Common Controller driver exposes a legacy HID device for compatability with older DirectInput only applications. Such a device can be used with the Joystick sample as a result. + +* This Xbox One driver for Windows also exposes a legacy HID device that behaves exactly as the Xbox 360 Common Controller driver's HID device support. + +* Legacy joysticks using a "gameport" are not supported for Windows Vista, Windows 7, or Windows 8. Only HID-based USB devices are supported. + +* The "ActionMapper" functionality was removed from DirectInput as of Windows Vista and is no longer supported. + +More Information +================ + +[DirectX Tool Kit: Now with GamePads](http://blogs.msdn.com/b/chuckw/archive/2014/09/05/directx-tool-kit-now-with-gamepads.aspx) + +[Where is the DirectX SDK?](http://blogs.msdn.com/b/chuckw/archive/2012/03/22/where-is-the-directx-sdk.aspx) + +[Where is the DirectX SDK (2013 Edition)?](http://blogs.msdn.com/b/chuckw/archive/2013/07/01/where-is-the-directx-sdk-2013-edition.aspx) + +[Games for Windows and DirectX SDK blog](http://blogs.msdn.com/b/chuckw/) \ No newline at end of file diff --git a/DirectInput/Readme.docx b/DirectInput/Readme.docx deleted file mode 100644 index 55a21f3d..00000000 Binary files a/DirectInput/Readme.docx and /dev/null differ diff --git a/DirectInput/ffconst.png b/DirectInput/ffconst.png new file mode 100644 index 00000000..87c2eced Binary files /dev/null and b/DirectInput/ffconst.png differ diff --git a/DirectInput/joystick.png b/DirectInput/joystick.png new file mode 100644 index 00000000..711b5d1e Binary files /dev/null and b/DirectInput/joystick.png differ