summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface
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/ControllerInterface
parent332cad21a40a2565141ca817a3cc684d8f10bfca (diff)
Rename all instances of "CemuhookUDPServer"/"UDPServer" to "DualShockUDPClient"/"DSUClient".
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface')
-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
5 files changed, 31 insertions, 31 deletions
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