summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon
diff options
context:
space:
mode:
authorrlnilsen <47765059+rlnilsen@users.noreply.github.com>2019-10-26 18:05:16 +0200
committerrlnilsen <47765059+rlnilsen@users.noreply.github.com>2019-10-27 16:05:22 +0100
commitda1f153b47a3f3f4eb9b976670bfddf68108bae9 (patch)
tree9d0f4bb163a4b844c44d6bb695154347e9a0bec6 /Source/Core/InputCommon
parent332cad21a40a2565141ca817a3cc684d8f10bfca (diff)
Rename all instances of "CemuhookUDPServer"/"UDPServer" to "DualShockUDPClient"/"DSUClient".
Diffstat (limited to 'Source/Core/InputCommon')
-rw-r--r--Source/Core/InputCommon/CMakeLists.txt6
-rw-r--r--Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp16
-rw-r--r--Source/Core/InputCommon/ControllerInterface/ControllerInterface.h2
-rw-r--r--Source/Core/InputCommon/ControllerInterface/DualShockUDPClient/DualShockUDPClient.cpp (renamed from Source/Core/InputCommon/ControllerInterface/CemuHookUDPServer/CemuHookUDPServer.cpp)32
-rw-r--r--Source/Core/InputCommon/ControllerInterface/DualShockUDPClient/DualShockUDPClient.h (renamed from Source/Core/InputCommon/ControllerInterface/CemuHookUDPServer/CemuHookUDPServer.h)4
-rw-r--r--Source/Core/InputCommon/ControllerInterface/DualShockUDPClient/DualShockUDPProto.h (renamed from Source/Core/InputCommon/ControllerInterface/CemuHookUDPServer/CemuHookUDPServerProto.h)8
-rw-r--r--Source/Core/InputCommon/InputCommon.vcxproj6
-rw-r--r--Source/Core/InputCommon/InputCommon.vcxproj.filters24
8 files changed, 48 insertions, 50 deletions
diff --git a/Source/Core/InputCommon/CMakeLists.txt b/Source/Core/InputCommon/CMakeLists.txt
index 38f2e03d2f..b1420155f6 100644
--- a/Source/Core/InputCommon/CMakeLists.txt
+++ b/Source/Core/InputCommon/CMakeLists.txt
@@ -43,9 +43,9 @@ add_library(inputcommon
ControllerEmu/ControlGroup/Triggers.h
ControllerEmu/Setting/NumericSetting.cpp
ControllerEmu/Setting/NumericSetting.h
- ControllerInterface/CemuHookUDPServer/CemuHookUDPServer.cpp
- ControllerInterface/CemuHookUDPServer/CemuHookUDPServer.h
- ControllerInterface/CemuHookUDPServer/CemuHookUDPServerProto.h
+ ControllerInterface/DualShockUDPClient/DualShockUDPClient.cpp
+ ControllerInterface/DualShockUDPClient/DualShockUDPClient.h
+ ControllerInterface/DualShockUDPClient/DualShockUDPProto.h
ControllerInterface/ControllerInterface.cpp
ControllerInterface/ControllerInterface.h
ControllerInterface/Device.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
}
diff --git a/Source/Core/InputCommon/ControllerInterface/ControllerInterface.h b/Source/Core/InputCommon/ControllerInterface/ControllerInterface.h
index f1a8e0c19e..359bd8f0c3 100644
--- a/Source/Core/InputCommon/ControllerInterface/ControllerInterface.h
+++ b/Source/Core/InputCommon/ControllerInterface/ControllerInterface.h
@@ -29,7 +29,7 @@
#if defined(USE_PIPES)
#define CIFACE_USE_PIPES
#endif
-#define CIFACE_USE_CEMUHOOKUDPSERVER
+#define CIFACE_USE_DUALSHOCKUDPCLIENT
//
// ControllerInterface
diff --git a/Source/Core/InputCommon/ControllerInterface/CemuHookUDPServer/CemuHookUDPServer.cpp b/Source/Core/InputCommon/ControllerInterface/DualShockUDPClient/DualShockUDPClient.cpp
index 36cd148041..60086d517c 100644
--- a/Source/Core/InputCommon/ControllerInterface/CemuHookUDPServer/CemuHookUDPServer.cpp
+++ b/Source/Core/InputCommon/ControllerInterface/DualShockUDPClient/DualShockUDPClient.cpp
@@ -2,7 +2,7 @@
// Licensed under GPLv2+
// Refer to the license.txt file included.
-#include "InputCommon/ControllerInterface/CemuHookUDPServer/CemuHookUDPServer.h"
+#include "InputCommon/ControllerInterface/DualShockUDPClient/DualShockUDPClient.h"
#include <chrono>
#include <cstring>
@@ -19,10 +19,10 @@
#include "Common/Thread.h"
#include "Core/CoreTiming.h"
#include "Core/HW/SystemTimers.h"
-#include "InputCommon/ControllerInterface/CemuHookUDPServer/CemuHookUDPServerProto.h"
#include "InputCommon/ControllerInterface/ControllerInterface.h"
+#include "InputCommon/ControllerInterface/DualShockUDPClient/DualShockUDPProto.h"
-namespace ciface::CemuHookUDPServer
+namespace ciface::DualShockUDPClient
{
class Device : public Core::Device
{
@@ -119,10 +119,10 @@ static constexpr int TOUCH_Y_AXIS_MAX = 500;
namespace Settings
{
const Config::ConfigInfo<bool> SERVER_ENABLED{
- {Config::System::CemuHookUdpServer, "Server", "Enabled"}, false};
+ {Config::System::DualShockUDPClient, "Server", "Enabled"}, false};
const Config::ConfigInfo<std::string> SERVER_ADDRESS{
- {Config::System::CemuHookUdpServer, "Server", "IPAddress"}, DEFAULT_SERVER_ADDRESS};
-const Config::ConfigInfo<int> SERVER_PORT{{Config::System::CemuHookUdpServer, "Server", "Port"},
+ {Config::System::DualShockUDPClient, "Server", "IPAddress"}, DEFAULT_SERVER_ADDRESS};
+const Config::ConfigInfo<int> SERVER_PORT{{Config::System::DualShockUDPClient, "Server", "Port"},
DEFAULT_SERVER_PORT};
} // namespace Settings
@@ -160,8 +160,8 @@ static sf::Socket::Status ReceiveWithTimeout(sf::UdpSocket& socket, void* data,
static void HotplugThreadFunc()
{
- Common::SetCurrentThreadName("CemuHookUDPServer Hotplug Thread");
- NOTICE_LOG(SERIALINTERFACE, "CemuHookUDPServer hotplug thread started");
+ Common::SetCurrentThreadName("DualShockUDPClient Hotplug Thread");
+ NOTICE_LOG(SERIALINTERFACE, "DualShockUDPClient hotplug thread started");
while (s_hotplug_thread_running.IsSet())
{
@@ -181,7 +181,7 @@ static void HotplugThreadFunc()
msg.Finish();
if (s_socket.send(&list_ports, sizeof list_ports, s_server_address, s_server_port) !=
sf::Socket::Status::Done)
- ERROR_LOG(SERIALINTERFACE, "CemuHookUDPServer HotplugThreadFunc send failed");
+ ERROR_LOG(SERIALINTERFACE, "DualShockUDPClient HotplugThreadFunc send failed");
}
// Receive controller port info
@@ -208,7 +208,7 @@ static void HotplugThreadFunc()
}
}
}
- NOTICE_LOG(SERIALINTERFACE, "CemuHookUDPServer hotplug thread stopped");
+ NOTICE_LOG(SERIALINTERFACE, "DualShockUDPClient hotplug thread stopped");
}
static void StartHotplugThread()
@@ -238,7 +238,7 @@ static void StopHotplugThread()
static void Restart()
{
- NOTICE_LOG(SERIALINTERFACE, "CemuHookUDPServer Restart");
+ NOTICE_LOG(SERIALINTERFACE, "DualShockUDPClient Restart");
StopHotplugThread();
@@ -278,10 +278,10 @@ void Init()
void PopulateDevices()
{
- NOTICE_LOG(SERIALINTERFACE, "CemuHookUDPServer PopulateDevices");
+ NOTICE_LOG(SERIALINTERFACE, "DualShockUDPClient PopulateDevices");
g_controller_interface.RemoveDevice(
- [](const auto* dev) { return dev->GetSource() == "UDPServer"; });
+ [](const auto* dev) { return dev->GetSource() == "DSUClient"; });
std::lock_guard<std::mutex> lock(s_port_info_mutex);
for (int port_index = 0; port_index < Proto::PORT_COUNT; port_index++)
@@ -374,7 +374,7 @@ std::string Device::GetName() const
std::string Device::GetSource() const
{
- return "UDPServer";
+ return "DSUClient";
}
void Device::UpdateInput()
@@ -392,7 +392,7 @@ void Device::UpdateInput()
msg.Finish();
if (m_socket.send(&data_req, sizeof(data_req), s_server_address, s_server_port) !=
sf::Socket::Status::Done)
- ERROR_LOG(SERIALINTERFACE, "CemuHookUDPServer UpdateInput send failed");
+ ERROR_LOG(SERIALINTERFACE, "DualShockUDPClient UpdateInput send failed");
}
// Receive and handle controller data
@@ -441,4 +441,4 @@ std::optional<int> Device::GetPreferredId() const
return m_index;
}
-} // namespace ciface::CemuHookUDPServer
+} // namespace ciface::DualShockUDPClient
diff --git a/Source/Core/InputCommon/ControllerInterface/CemuHookUDPServer/CemuHookUDPServer.h b/Source/Core/InputCommon/ControllerInterface/DualShockUDPClient/DualShockUDPClient.h
index f7eaa34407..b4bb1210c6 100644
--- a/Source/Core/InputCommon/ControllerInterface/CemuHookUDPServer/CemuHookUDPServer.h
+++ b/Source/Core/InputCommon/ControllerInterface/DualShockUDPClient/DualShockUDPClient.h
@@ -4,7 +4,7 @@
#include "Common/Config/Config.h"
-namespace ciface::CemuHookUDPServer
+namespace ciface::DualShockUDPClient
{
namespace Settings
{
@@ -16,4 +16,4 @@ extern const Config::ConfigInfo<int> SERVER_PORT;
void Init();
void PopulateDevices();
void DeInit();
-} // namespace ciface::CemuHookUDPServer
+} // namespace ciface::DualShockUDPClient
diff --git a/Source/Core/InputCommon/ControllerInterface/CemuHookUDPServer/CemuHookUDPServerProto.h b/Source/Core/InputCommon/ControllerInterface/DualShockUDPClient/DualShockUDPProto.h
index 60c8059292..45980bcd5d 100644
--- a/Source/Core/InputCommon/ControllerInterface/CemuHookUDPServer/CemuHookUDPServerProto.h
+++ b/Source/Core/InputCommon/ControllerInterface/DualShockUDPClient/DualShockUDPProto.h
@@ -8,9 +8,9 @@
#include "Common/CommonTypes.h"
-namespace ciface::CemuHookUDPServer::Proto
+namespace ciface::DualShockUDPClient::Proto
{
-// CemuHook UDPServer protocol implementation using UdpServer.cs from
+// CemuHook DualShockUDP protocol implementation using UdpServer.cs from
// https://github.com/Ryochan7/DS4Windows as documentation.
//
// WARNING: Little endian host assumed
@@ -245,7 +245,7 @@ struct Message
if (crc32_in_header != crc32_calculated)
{
NOTICE_LOG(SERIALINTERFACE,
- "CemuHookUDPServer Received message with bad CRC in header: got %u, expected %u",
+ "DualShockUDPClient Received message with bad CRC in header: got %u, expected %u",
crc32_in_header, crc32_calculated);
return std::nullopt;
}
@@ -267,4 +267,4 @@ struct Message
};
#pragma pack(pop)
-} // namespace ciface::CemuHookUDPServer::Proto
+} // namespace ciface::DualShockUDPClient::Proto
diff --git a/Source/Core/InputCommon/InputCommon.vcxproj b/Source/Core/InputCommon/InputCommon.vcxproj
index e3d252cb5f..262ba2f52e 100644
--- a/Source/Core/InputCommon/InputCommon.vcxproj
+++ b/Source/Core/InputCommon/InputCommon.vcxproj
@@ -56,13 +56,13 @@
<ClCompile Include="ControllerEmu\ControlGroup\Tilt.cpp" />
<ClCompile Include="ControllerEmu\ControlGroup\Triggers.cpp" />
<ClCompile Include="ControllerEmu\Setting\NumericSetting.cpp" />
- <ClCompile Include="ControllerInterface\CemuHookUDPServer\CemuHookUDPServer.cpp" />
<ClCompile Include="ControllerInterface\ControllerInterface.cpp" />
<ClCompile Include="ControllerInterface\Device.cpp" />
<ClCompile Include="ControllerInterface\DInput\DInput.cpp" />
<ClCompile Include="ControllerInterface\DInput\DInputJoystick.cpp" />
<ClCompile Include="ControllerInterface\DInput\DInputKeyboardMouse.cpp" />
<ClCompile Include="ControllerInterface\DInput\XInputFilter.cpp" />
+ <ClCompile Include="ControllerInterface\DualShockUDPClient\DualShockUDPClient.cpp" />
<ClCompile Include="ControlReference\ControlReference.cpp" />
<ClCompile Include="ControlReference\ExpressionParser.cpp" />
<ClCompile Include="ControllerInterface\ForceFeedback\ForceFeedbackDevice.cpp" />
@@ -100,8 +100,6 @@
<ClInclude Include="ControllerEmu\ControlGroup\Tilt.h" />
<ClInclude Include="ControllerEmu\ControlGroup\Triggers.h" />
<ClInclude Include="ControllerEmu\Setting\NumericSetting.h" />
- <ClInclude Include="ControllerInterface\CemuHookUDPServer\CemuHookUDPServer.h" />
- <ClInclude Include="ControllerInterface\CemuHookUDPServer\CemuHookUDPServerProto.h" />
<ClInclude Include="ControllerInterface\ControllerInterface.h" />
<ClInclude Include="ControllerInterface\Device.h" />
<ClInclude Include="ControllerInterface\DInput\DInput.h" />
@@ -109,6 +107,8 @@
<ClInclude Include="ControllerInterface\DInput\DInputJoystick.h" />
<ClInclude Include="ControllerInterface\DInput\DInputKeyboardMouse.h" />
<ClInclude Include="ControllerInterface\DInput\XInputFilter.h" />
+ <ClInclude Include="ControllerInterface\DualShockUDPClient\DualShockUDPClient.h" />
+ <ClInclude Include="ControllerInterface\DualShockUDPClient\DualShockUDPProto.h" />
<ClInclude Include="ControlReference\ControlReference.h" />
<ClInclude Include="ControlReference\FunctionExpression.h" />
<ClInclude Include="ControlReference\ExpressionParser.h" />
diff --git a/Source/Core/InputCommon/InputCommon.vcxproj.filters b/Source/Core/InputCommon/InputCommon.vcxproj.filters
index ca29eec811..0c8d79326f 100644
--- a/Source/Core/InputCommon/InputCommon.vcxproj.filters
+++ b/Source/Core/InputCommon/InputCommon.vcxproj.filters
@@ -28,8 +28,8 @@
<Filter Include="ControllerInterface\XInput">
<UniqueIdentifier>{07bad1aa-7e03-4f5c-ade2-a44857c5cbc3}</UniqueIdentifier>
</Filter>
- <Filter Include="ControllerInterface\CemuHookUDPServer">
- <UniqueIdentifier>{4f71c21c-85eb-4e76-ad64-40fd97bc3d6d}</UniqueIdentifier>
+ <Filter Include="ControllerInterface\DualShockUDPClient">
+ <UniqueIdentifier>{ff02580e-3a62-4de4-a135-3a6c2c339a90}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
@@ -126,15 +126,15 @@
<ClCompile Include="ControllerEmu\ControlGroup\IMUCursor.cpp">
<Filter>ControllerEmu\ControlGroup</Filter>
</ClCompile>
- <ClCompile Include="ControllerInterface\CemuHookUDPServer\CemuHookUDPServer.cpp">
- <Filter>ControllerInterface\CemuHookUDPServer</Filter>
- </ClCompile>
<ClCompile Include="ControllerEmu\ControlGroup\IMUAccelerometer.cpp">
<Filter>ControllerEmu\ControlGroup</Filter>
</ClCompile>
<ClCompile Include="ControllerEmu\ControlGroup\IMUGyroscope.cpp">
<Filter>ControllerEmu\ControlGroup</Filter>
</ClCompile>
+ <ClCompile Include="ControllerInterface\DualShockUDPClient\DualShockUDPClient.cpp">
+ <Filter>ControllerInterface\DualShockUDPClient</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="GCAdapter.h" />
@@ -224,9 +224,6 @@
<ClInclude Include="ControlReference\ControlReference.h">
<Filter>ControllerInterface</Filter>
</ClInclude>
- <ClCompile Include="ControlReference\FunctionExpression.h">
- <Filter>ControllerInterface</Filter>
- </ClCompile>
<ClInclude Include="InputProfile.h" />
<ClInclude Include="ControllerEmu\ControlGroup\Attachments.h">
<Filter>ControllerEmu\ControlGroup</Filter>
@@ -234,17 +231,18 @@
<ClInclude Include="ControllerEmu\ControlGroup\IMUCursor.h">
<Filter>ControllerEmu\ControlGroup</Filter>
</ClInclude>
- <ClInclude Include="ControllerInterface\CemuHookUDPServer\CemuHookUDPServer.h">
- <Filter>ControllerInterface\CemuHookUDPServer</Filter>
- </ClInclude>
<ClInclude Include="ControllerEmu\ControlGroup\IMUAccelerometer.h">
<Filter>ControllerEmu\ControlGroup</Filter>
</ClInclude>
<ClInclude Include="ControllerEmu\ControlGroup\IMUGyroscope.h">
<Filter>ControllerEmu\ControlGroup</Filter>
</ClInclude>
- <ClInclude Include="ControllerInterface\CemuHookUDPServer\CemuHookUDPServerProto.h">
- <Filter>ControllerInterface\CemuHookUDPServer</Filter>
+ <ClInclude Include="ControlReference\FunctionExpression.h" />
+ <ClInclude Include="ControllerInterface\DualShockUDPClient\DualShockUDPClient.h">
+ <Filter>ControllerInterface\DualShockUDPClient</Filter>
+ </ClInclude>
+ <ClInclude Include="ControllerInterface\DualShockUDPClient\DualShockUDPProto.h">
+ <Filter>ControllerInterface\DualShockUDPClient</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>