Support Steam Deck controls directly through hidraw

This reads Steam Deck controls bypassing Steam Input. This allows for access to
motion controls as well as independent access to thumb sticks, trackpads, and
back grip buttons.
This commit is contained in:
R
2023-04-20 00:49:50 +01:00
parent 1a2dcc53f2
commit c5d2ad99d2
5 changed files with 336 additions and 0 deletions

View File

@ -192,3 +192,13 @@ if(MSVC)
# Add precompiled header
target_link_libraries(inputcommon PRIVATE use_pch)
endif()
if(TARGET Hidapi::Hidapi)
target_sources(inputcommon
PRIVATE
ControllerInterface/SteamDeck/SteamDeck.cpp
ControllerInterface/SteamDeck/SteamDeck.h
)
target_link_libraries(inputcommon PUBLIC Hidapi::Hidapi)
target_compile_definitions(inputcommon PRIVATE -DHAVE_HIDAPI=1)
endif()