Skip to content
Permalink
Browse files

Split the XInput and DirectInput code so Windows RT can use the exist…

…ing XInput support.
  • Loading branch information
slouken committed Jul 3, 2014
1 parent 5a3c553 commit b79e7f32cc4e0dcf52ba7580416f97602bd91332
Showing with 3,967 additions and 3,156 deletions.
  1. +15 −1 VisualC-WinRT/WinRT80_VS2012/SDL-WinRT80.vcxproj
  2. +45 −3 VisualC-WinRT/WinRT80_VS2012/SDL-WinRT80.vcxproj.filters
  3. +15 −1 VisualC-WinRT/WinRT81_VS2013/SDL-WinRT81.vcxproj
  4. +33 −3 VisualC-WinRT/WinRT81_VS2013/SDL-WinRT81.vcxproj.filters
  5. +140 −20 VisualC/SDL/SDL_VS2008.vcproj
  6. +38 −5 VisualC/SDL/SDL_VS2010.vcxproj
  7. +38 −5 VisualC/SDL/SDL_VS2012.vcxproj
  8. +38 −5 VisualC/SDL/SDL_VS2013.vcxproj
  9. +53 −13 configure
  10. +34 −11 configure.in
  11. +6 −0 include/SDL_config.h.in
  12. +6 −0 include/SDL_config_windows.h
  13. +3 −3 include/SDL_config_winrt.h
  14. +1 −1 src/audio/directsound/SDL_directsound.h
  15. +14 −5 src/{audio/directsound/directx.h → core/windows/SDL_directx.h}
  16. +94 −0 src/core/windows/SDL_xinput.c
  17. +9 −61 src/{joystick/windows/SDL_dxjoystick_c.h → core/windows/SDL_xinput.h}
  18. +263 −782 src/haptic/windows/{SDL_syshaptic.c → SDL_dinputhaptic.c}
  19. +47 −0 src/haptic/windows/SDL_dinputhaptic_c.h
  20. +445 −0 src/haptic/windows/SDL_windowshaptic.c
  21. +88 −0 src/haptic/windows/SDL_windowshaptic_c.h
  22. +491 −0 src/haptic/windows/SDL_xinputhaptic.c
  23. +47 −0 src/haptic/windows/SDL_xinputhaptic_c.h
  24. +0 −10 src/joystick/SDL_gamecontroller.c
  25. +10 −7 src/joystick/SDL_gamecontrollerdb.h
  26. +6 −3 src/joystick/SDL_sysjoystick.h
  27. +900 −0 src/joystick/windows/SDL_dinputjoystick.c
  28. +7 −5 src/{haptic/windows/SDL_syshaptic_c.h → joystick/windows/SDL_dinputjoystick_c.h}
  29. +0 −1,661 src/joystick/windows/SDL_dxjoystick.c
  30. +569 −0 src/joystick/windows/SDL_windowsjoystick.c
  31. +89 −0 src/joystick/windows/SDL_windowsjoystick_c.h
  32. +390 −0 src/joystick/windows/SDL_xinputjoystick.c
  33. +33 −0 src/joystick/windows/SDL_xinputjoystick_c.h
  34. +0 −551 src/joystick/winrt/SDL_xinputjoystick.c
@@ -47,6 +47,7 @@
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</CompileAsWinRT>
</ClCompile>
<ClCompile Include="..\..\src\core\windows\SDL_windows.c" />
<ClCompile Include="..\..\src\core\windows\SDL_xinput.c" />
<ClCompile Include="..\..\src\core\winrt\SDL_winrtapp_common.cpp">
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">true</CompileAsWinRT>
@@ -93,9 +94,14 @@
<ClCompile Include="..\..\src\file\SDL_rwops.c" />
<ClCompile Include="..\..\src\haptic\dummy\SDL_syshaptic.c" />
<ClCompile Include="..\..\src\haptic\SDL_haptic.c" />
<ClCompile Include="..\..\src\haptic\windows\SDL_dinputhaptic.c" />
<ClCompile Include="..\..\src\haptic\windows\SDL_windowshaptic.c" />
<ClCompile Include="..\..\src\haptic\windows\SDL_xinputhaptic.c" />
<ClCompile Include="..\..\src\joystick\SDL_gamecontroller.c" />
<ClCompile Include="..\..\src\joystick\SDL_joystick.c" />
<ClCompile Include="..\..\src\joystick\winrt\SDL_xinputjoystick.c" />
<ClCompile Include="..\..\src\joystick\windows\SDL_dinputjoystick.c" />
<ClCompile Include="..\..\src\joystick\windows\SDL_windowsjoystick.c" />
<ClCompile Include="..\..\src\joystick\windows\SDL_xinputjoystick.c" />
<ClCompile Include="..\..\src\loadso\windows\SDL_sysloadso.c" />
<ClCompile Include="..\..\src\power\SDL_power.c" />
<ClCompile Include="..\..\src\power\winrt\SDL_syspower.cpp" />
@@ -278,7 +284,9 @@
<ClInclude Include="..\..\src\audio\SDL_sysaudio.h" />
<ClInclude Include="..\..\src\audio\SDL_wave.h" />
<ClInclude Include="..\..\src\audio\xaudio2\SDL_xaudio2_winrthelpers.h" />
<ClInclude Include="..\..\src\core\windows\SDL_directx.h" />
<ClInclude Include="..\..\src\core\windows\SDL_windows.h" />
<ClInclude Include="..\..\src\core\windows\SDL_xinput.h" />
<ClInclude Include="..\..\src\core\winrt\SDL_winrtapp_common.h" />
<ClInclude Include="..\..\src\core\winrt\SDL_winrtapp_direct3d.h" />
<ClInclude Include="..\..\src\core\winrt\SDL_winrtapp_xaml.h" />
@@ -297,9 +305,15 @@
<ClInclude Include="..\..\src\events\SDL_windowevents_c.h" />
<ClInclude Include="..\..\src\haptic\SDL_haptic_c.h" />
<ClInclude Include="..\..\src\haptic\SDL_syshaptic.h" />
<ClInclude Include="..\..\src\haptic\windows\SDL_dinputhaptic_c.h" />
<ClInclude Include="..\..\src\haptic\windows\SDL_windowshaptic_c.h" />
<ClInclude Include="..\..\src\haptic\windows\SDL_xinputhaptic_c.h" />
<ClInclude Include="..\..\src\joystick\SDL_gamecontrollerdb.h" />
<ClInclude Include="..\..\src\joystick\SDL_joystick_c.h" />
<ClInclude Include="..\..\src\joystick\SDL_sysjoystick.h" />
<ClInclude Include="..\..\src\joystick\windows\SDL_dinputjoystick_c.h" />
<ClInclude Include="..\..\src\joystick\windows\SDL_windowsjoystick_c.h" />
<ClInclude Include="..\..\src\joystick\windows\SDL_xinputjoystick_c.h" />
<ClInclude Include="..\..\src\render\direct3d11\SDL_render_winrt.h" />
<ClInclude Include="..\..\src\render\mmx.h" />
<ClInclude Include="..\..\src\render\opengles2\SDL_gles2funcs.h" />
@@ -247,9 +247,6 @@
<ClCompile Include="..\..\src\video\winrt\SDL_winrtkeyboard.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\joystick\winrt\SDL_xinputjoystick.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\video\winrt\SDL_winrtpointerinput.cpp">
<Filter>Source Files</Filter>
</ClCompile>
@@ -298,6 +295,27 @@
<ClCompile Include="..\..\src\video\winrt\SDL_winrtmessagebox.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\joystick\windows\SDL_xinputjoystick.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\joystick\windows\SDL_windowsjoystick.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\joystick\windows\SDL_dinputjoystick.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\core\windows\SDL_xinput.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\haptic\windows\SDL_dinputhaptic.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\haptic\windows\SDL_xinputhaptic.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\haptic\windows\SDL_windowshaptic.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\include\begin_code.h">
@@ -672,6 +690,30 @@
<ClInclude Include="..\..\src\video\winrt\SDL_winrtmessagebox.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\joystick\windows\SDL_windowsjoystick_c.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\joystick\windows\SDL_xinputjoystick_c.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\joystick\windows\SDL_dinputjoystick_c.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\core\windows\SDL_xinput.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\core\windows\SDL_directx.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\haptic\windows\SDL_windowshaptic_c.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\haptic\windows\SDL_dinputhaptic_c.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\haptic\windows\SDL_xinputhaptic_c.h">
<Filter>Source Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Filter Include="Header Files">
@@ -86,7 +86,9 @@
<ClInclude Include="..\..\src\audio\SDL_sysaudio.h" />
<ClInclude Include="..\..\src\audio\SDL_wave.h" />
<ClInclude Include="..\..\src\audio\xaudio2\SDL_xaudio2_winrthelpers.h" />
<ClInclude Include="..\..\src\core\windows\SDL_directx.h" />
<ClInclude Include="..\..\src\core\windows\SDL_windows.h" />
<ClInclude Include="..\..\src\core\windows\SDL_xinput.h" />
<ClInclude Include="..\..\src\core\winrt\SDL_winrtapp_common.h" />
<ClInclude Include="..\..\src\core\winrt\SDL_winrtapp_direct3d.h" />
<ClInclude Include="..\..\src\core\winrt\SDL_winrtapp_xaml.h" />
@@ -105,9 +107,15 @@
<ClInclude Include="..\..\src\events\SDL_windowevents_c.h" />
<ClInclude Include="..\..\src\haptic\SDL_haptic_c.h" />
<ClInclude Include="..\..\src\haptic\SDL_syshaptic.h" />
<ClInclude Include="..\..\src\haptic\windows\SDL_dinputhaptic_c.h" />
<ClInclude Include="..\..\src\haptic\windows\SDL_windowshaptic_c.h" />
<ClInclude Include="..\..\src\haptic\windows\SDL_xinputhaptic_c.h" />
<ClInclude Include="..\..\src\joystick\SDL_gamecontrollerdb.h" />
<ClInclude Include="..\..\src\joystick\SDL_joystick_c.h" />
<ClInclude Include="..\..\src\joystick\SDL_sysjoystick.h" />
<ClInclude Include="..\..\src\joystick\windows\SDL_dinputjoystick_c.h" />
<ClInclude Include="..\..\src\joystick\windows\SDL_windowsjoystick_c.h" />
<ClInclude Include="..\..\src\joystick\windows\SDL_xinputjoystick_c.h" />
<ClInclude Include="..\..\src\render\direct3d11\SDL_render_winrt.h" />
<ClInclude Include="..\..\src\render\mmx.h" />
<ClInclude Include="..\..\src\render\opengles2\SDL_gles2funcs.h" />
@@ -173,6 +181,7 @@
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</CompileAsWinRT>
</ClCompile>
<ClCompile Include="..\..\src\core\windows\SDL_windows.c" />
<ClCompile Include="..\..\src\core\windows\SDL_xinput.c" />
<ClCompile Include="..\..\src\core\winrt\SDL_winrtapp_common.cpp">
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</CompileAsWinRT>
@@ -219,10 +228,15 @@
<ClCompile Include="..\..\src\file\SDL_rwops.c" />
<ClCompile Include="..\..\src\haptic\dummy\SDL_syshaptic.c" />
<ClCompile Include="..\..\src\haptic\SDL_haptic.c" />
<ClCompile Include="..\..\src\haptic\windows\SDL_dinputhaptic.c" />
<ClCompile Include="..\..\src\haptic\windows\SDL_windowshaptic.c" />
<ClCompile Include="..\..\src\haptic\windows\SDL_xinputhaptic.c" />
<ClCompile Include="..\..\src\joystick\dummy\SDL_sysjoystick.c" />
<ClCompile Include="..\..\src\joystick\SDL_gamecontroller.c" />
<ClCompile Include="..\..\src\joystick\SDL_joystick.c" />
<ClCompile Include="..\..\src\joystick\winrt\SDL_xinputjoystick.c" />
<ClCompile Include="..\..\src\joystick\windows\SDL_dinputjoystick.c" />
<ClCompile Include="..\..\src\joystick\windows\SDL_windowsjoystick.c" />
<ClCompile Include="..\..\src\joystick\windows\SDL_xinputjoystick.c" />
<ClCompile Include="..\..\src\loadso\windows\SDL_sysloadso.c" />
<ClCompile Include="..\..\src\power\SDL_power.c" />
<ClCompile Include="..\..\src\power\winrt\SDL_syspower.cpp" />
@@ -381,6 +381,24 @@
<ClInclude Include="..\..\src\video\winrt\SDL_winrtvideo_cpp.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\core\windows\SDL_directx.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\core\windows\SDL_xinput.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\joystick\windows\SDL_windowsjoystick_c.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\joystick\windows\SDL_xinputjoystick_c.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\joystick\windows\SDL_dinputjoystick_c.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\haptic\windows\SDL_windowshaptic_c.h" />
<ClInclude Include="..\..\src\haptic\windows\SDL_dinputhaptic_c.h" />
<ClInclude Include="..\..\src\haptic\windows\SDL_xinputhaptic_c.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\src\atomic\SDL_atomic.c">
@@ -485,9 +503,6 @@
<ClCompile Include="..\..\src\joystick\SDL_joystick.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\joystick\winrt\SDL_xinputjoystick.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\loadso\windows\SDL_sysloadso.c">
<Filter>Source Files</Filter>
</ClCompile>
@@ -683,5 +698,20 @@
<ClCompile Include="..\..\src\video\winrt\SDL_winrtvideo.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\core\windows\SDL_xinput.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\joystick\windows\SDL_windowsjoystick.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\joystick\windows\SDL_xinputjoystick.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\joystick\windows\SDL_dinputjoystick.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\haptic\windows\SDL_windowshaptic.c" />
<ClCompile Include="..\..\src\haptic\windows\SDL_xinputhaptic.c" />
<ClCompile Include="..\..\src\haptic\windows\SDL_dinputhaptic.c" />
</ItemGroup>
</Project>

0 comments on commit b79e7f3

Please sign in to comment.