Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DS3 Pad Handler #5641

Merged
merged 3 commits into from Mar 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Expand Up @@ -48,3 +48,6 @@
path = 3rdparty/libpng
url = https://github.com/glennrp/libpng.git
ignore = dirty
[submodule "3rdparty/libusb"]
path = 3rdparty/libusb
url = https://github.com/RPCS3/libusb.git
2 changes: 1 addition & 1 deletion .travis/build-linux.bash
Expand Up @@ -8,7 +8,7 @@ export LD_LIBRARY_PATH=$QT_BASE_DIR/lib/x86_64-linux-gnu:$QT_BASE_DIR/lib

cd rpcs3

git submodule update --quiet --init asmjit 3rdparty/ffmpeg 3rdparty/pugixml 3rdparty/GSL 3rdparty/libpng 3rdparty/cereal 3rdparty/hidapi 3rdparty/xxHash 3rdparty/yaml-cpp Vulkan/glslang
git submodule update --quiet --init asmjit 3rdparty/ffmpeg 3rdparty/pugixml 3rdparty/GSL 3rdparty/libpng 3rdparty/cereal 3rdparty/hidapi 3rdparty/xxHash 3rdparty/yaml-cpp 3rdparty/libusb Vulkan/glslang

# Download pre-compiled llvm libs
curl -sLO https://github.com/RPCS3/llvm/releases/download/continuous-linux-master/llvmlibs-linux.tar.gz
Expand Down
2 changes: 1 addition & 1 deletion .travis/build-mac.bash
Expand Up @@ -19,7 +19,7 @@ cp target/release/libportability.dylib vulkan-sdk/lib/libVulkan.dylib
install_name_tool -id ${PWD}/vulkan-sdk/lib/libVulkan.dylib vulkan-sdk/lib/libVulkan.dylib
export VULKAN_SDK=${PWD}/vulkan-sdk

git submodule update --quiet --init asmjit 3rdparty/ffmpeg 3rdparty/pugixml 3rdparty/GSL 3rdparty/libpng 3rdparty/cereal 3rdparty/hidapi 3rdparty/xxHash 3rdparty/yaml-cpp Vulkan/glslang
git submodule update --quiet --init asmjit 3rdparty/ffmpeg 3rdparty/pugixml 3rdparty/GSL 3rdparty/libpng 3rdparty/cereal 3rdparty/hidapi 3rdparty/libusb 3rdparty/xxHash 3rdparty/yaml-cpp Vulkan/glslang

mkdir build; cd build
cmake .. -DWITH_LLVM=OFF -DUSE_NATIVE_INSTRUCTIONS=OFF -G Ninja
Expand Down
5 changes: 5 additions & 0 deletions 3rdparty/CMakeLists.txt
Expand Up @@ -86,6 +86,10 @@ else()
endif()


# libusb
add_subdirectory(libusb EXCLUDE_FROM_ALL)


# yaml-cpp
# We don't want to install yaml-cpp but its cmake file doesn't have option
# to disable it...
Expand Down Expand Up @@ -342,6 +346,7 @@ include(llvm.cmake)


# add nice ALIAS targets for ease of use
add_library(3rdparty::libusb ALIAS usb-1.0-static)
add_library(3rdparty::zlib ALIAS 3rdparty_zlib)
add_library(3rdparty::pugixml ALIAS pugixml)
add_library(3rdparty::yaml-cpp ALIAS yaml-cpp)
Expand Down
1 change: 1 addition & 0 deletions 3rdparty/libusb
Submodule libusb added at 2e4193
1 change: 1 addition & 0 deletions appveyor.yml
Expand Up @@ -49,6 +49,7 @@ install:
3rdparty/GSL `
3rdparty/hidapi `
3rdparty/libpng `
3rdparty/libusb `
3rdparty/pugixml `
3rdparty/xxHash `
3rdparty/yaml-cpp `
Expand Down
15 changes: 15 additions & 0 deletions rpcs3.sln
Expand Up @@ -74,6 +74,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "xxhash", "xxhash", "{D16E24
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xxhash", "3rdparty\xxhash.vcxproj", "{939FE206-1182-ABC3-1234-FEAB88E98404}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "libusb", "libusb", "{6D8E86F7-84A0-45BA-ACC3-F02FC5545B3B}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libusb-1.0 (static)", "3rdparty\libusb\msvc\libusb_static_2017.vcxproj", "{349EE8F9-7D25-4909-AAF5-FF3FADE72187}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug - LLVM|x64 = Debug - LLVM|x64
Expand Down Expand Up @@ -232,6 +236,16 @@ Global
{939FE206-1182-ABC3-1234-FEAB88E98404}.Release - LLVM|x64.Build.0 = Release|x64
{939FE206-1182-ABC3-1234-FEAB88E98404}.Release|x64.ActiveCfg = Release|x64
{939FE206-1182-ABC3-1234-FEAB88E98404}.Release|x64.Build.0 = Release|x64
{349EE8F9-7D25-4909-AAF5-FF3FADE72187}.Debug - LLVM|x64.ActiveCfg = Debug|x64
{349EE8F9-7D25-4909-AAF5-FF3FADE72187}.Debug - LLVM|x64.Build.0 = Debug|x64
{349EE8F9-7D25-4909-AAF5-FF3FADE72187}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
{349EE8F9-7D25-4909-AAF5-FF3FADE72187}.Debug - MemLeak|x64.Build.0 = Debug|x64
{349EE8F9-7D25-4909-AAF5-FF3FADE72187}.Debug|x64.ActiveCfg = Debug|x64
{349EE8F9-7D25-4909-AAF5-FF3FADE72187}.Debug|x64.Build.0 = Debug|x64
{349EE8F9-7D25-4909-AAF5-FF3FADE72187}.Release - LLVM|x64.ActiveCfg = Release|x64
{349EE8F9-7D25-4909-AAF5-FF3FADE72187}.Release - LLVM|x64.Build.0 = Release|x64
{349EE8F9-7D25-4909-AAF5-FF3FADE72187}.Release|x64.ActiveCfg = Release|x64
{349EE8F9-7D25-4909-AAF5-FF3FADE72187}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -252,6 +266,7 @@ Global
{FDC361C5-7734-493B-8CFB-037308B35122} = {DDF904CA-2771-441A-8629-5DF2EB922A79}
{A107C21C-418A-4697-BB10-20C3AA60E2E4} = {FA1E6C16-CA63-45F8-8D52-E21DF396BE36}
{939FE206-1182-ABC3-1234-FEAB88E98404} = {D16E245C-CC5A-4B9A-8BAB-1176F02C1631}
{349EE8F9-7D25-4909-AAF5-FF3FADE72187} = {6D8E86F7-84A0-45BA-ACC3-F02FC5545B3B}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {06CC7920-E085-4B81-9582-8DE8AAD42510}
Expand Down
2 changes: 1 addition & 1 deletion rpcs3/CMakeLists.txt
Expand Up @@ -55,7 +55,7 @@ set_target_properties(rpcs3
AUTOUIC ON)

target_link_libraries(rpcs3 rpcs3_emu rpcs3_ui)
target_link_libraries(rpcs3 3rdparty::discord-rpc 3rdparty::qt5 3rdparty::hidapi)
target_link_libraries(rpcs3 3rdparty::discord-rpc 3rdparty::qt5 3rdparty::hidapi 3rdparty::libusb)
target_link_libraries(rpcs3 ${ADDITIONAL_LIBS})

# Win resource file
Expand Down
1 change: 1 addition & 0 deletions rpcs3/Emu/System.cpp
Expand Up @@ -100,6 +100,7 @@ void fmt_class_string<pad_handler>::format(std::string& out, u64 arg)
{
case pad_handler::null: return "Null";
case pad_handler::keyboard: return "Keyboard";
case pad_handler::ds3: return "DualShock 3";
case pad_handler::ds4: return "DualShock 4";
#ifdef _WIN32
case pad_handler::xinput: return "XInput";
Expand Down
1 change: 1 addition & 0 deletions rpcs3/Emu/System.h
Expand Up @@ -63,6 +63,7 @@ enum class pad_handler
{
null,
keyboard,
ds3,
ds4,
#ifdef _WIN32
xinput,
Expand Down