From 4cb3baba5cf360a02dff9d6af1a839a570c40999 Mon Sep 17 00:00:00 2001 From: rlnilsen <47765059+rlnilsen@users.noreply.github.com> Date: Fri, 6 Sep 2019 17:09:30 +0200 Subject: Add support for motion controllers via the CemuHook controller input protocol. This is done by: 1) Implementing said protocol in a new controller input class CemuHookUDPServer. 2) Adding functionality in the WiimoteEmu class for pushing that motion input to the emulated Wiimote and MotionPlus. 3) Suitably modifying the UI for configuring an Emulated Wii Remote. --- .../InputCommon/ControllerInterface/ControllerInterface.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp') diff --git a/Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp b/Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp index bb5ccb3f0e..5f20fd475b 100644 --- a/Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp +++ b/Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp @@ -30,6 +30,9 @@ #ifdef CIFACE_USE_PIPES #include "InputCommon/ControllerInterface/Pipes/Pipes.h" #endif +#ifdef CIFACE_USE_CEMUHOOKUDPSERVER +#include "InputCommon/ControllerInterface/CemuHookUDPServer/CemuHookUDPServer.h" +#endif ControllerInterface g_controller_interface; @@ -67,6 +70,9 @@ void ControllerInterface::Initialize(const WindowSystemInfo& wsi) #endif #ifdef CIFACE_USE_PIPES // nothing needed +#endif +#ifdef CIFACE_USE_CEMUHOOKUDPSERVER + ciface::CemuHookUDPServer::Init(); #endif RefreshDevices(); @@ -122,6 +128,9 @@ void ControllerInterface::RefreshDevices() #ifdef CIFACE_USE_PIPES ciface::Pipes::PopulateDevices(); #endif +#ifdef CIFACE_USE_CEMUHOOKUDPSERVER + ciface::CemuHookUDPServer::PopulateDevices(); +#endif m_is_populating_devices = false; InvokeDevicesChangedCallbacks(); @@ -172,6 +181,9 @@ void ControllerInterface::Shutdown() #ifdef CIFACE_USE_EVDEV ciface::evdev::Shutdown(); #endif +#ifdef CIFACE_USE_CEMUHOOKUDPSERVER + ciface::CemuHookUDPServer::DeInit(); +#endif } void ControllerInterface::AddDevice(std::shared_ptr device) -- cgit v1.2.3 From da1f153b47a3f3f4eb9b976670bfddf68108bae9 Mon Sep 17 00:00:00 2001 From: rlnilsen <47765059+rlnilsen@users.noreply.github.com> Date: Sat, 26 Oct 2019 18:05:16 +0200 Subject: Rename all instances of "CemuhookUDPServer"/"UDPServer" to "DualShockUDPClient"/"DSUClient". --- .../ControllerInterface/ControllerInterface.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp') diff --git a/Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp b/Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp index 5f20fd475b..35dfbde0be 100644 --- a/Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp +++ b/Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp @@ -30,8 +30,8 @@ #ifdef CIFACE_USE_PIPES #include "InputCommon/ControllerInterface/Pipes/Pipes.h" #endif -#ifdef CIFACE_USE_CEMUHOOKUDPSERVER -#include "InputCommon/ControllerInterface/CemuHookUDPServer/CemuHookUDPServer.h" +#ifdef CIFACE_USE_DUALSHOCKUDPCLIENT +#include "InputCommon/ControllerInterface/DualShockUDPClient/DualShockUDPClient.h" #endif ControllerInterface g_controller_interface; @@ -71,8 +71,8 @@ void ControllerInterface::Initialize(const WindowSystemInfo& wsi) #ifdef CIFACE_USE_PIPES // nothing needed #endif -#ifdef CIFACE_USE_CEMUHOOKUDPSERVER - ciface::CemuHookUDPServer::Init(); +#ifdef CIFACE_USE_DUALSHOCKUDPCLIENT + ciface::DualShockUDPClient::Init(); #endif RefreshDevices(); @@ -128,8 +128,8 @@ void ControllerInterface::RefreshDevices() #ifdef CIFACE_USE_PIPES ciface::Pipes::PopulateDevices(); #endif -#ifdef CIFACE_USE_CEMUHOOKUDPSERVER - ciface::CemuHookUDPServer::PopulateDevices(); +#ifdef CIFACE_USE_DUALSHOCKUDPCLIENT + ciface::DualShockUDPClient::PopulateDevices(); #endif m_is_populating_devices = false; @@ -181,8 +181,8 @@ void ControllerInterface::Shutdown() #ifdef CIFACE_USE_EVDEV ciface::evdev::Shutdown(); #endif -#ifdef CIFACE_USE_CEMUHOOKUDPSERVER - ciface::CemuHookUDPServer::DeInit(); +#ifdef CIFACE_USE_DUALSHOCKUDPCLIENT + ciface::DualShockUDPClient::DeInit(); #endif } -- cgit v1.2.3