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: [PATCH] Rename all instances of "CemuhookUDPServer"/"UDPServer" to "DualShockUDPClient"/"DSUClient". --- Source/Core/Common/CommonPaths.h | 2 +- Source/Core/Common/Config/Config.cpp | 2 +- Source/Core/Common/Config/Enums.h | 2 +- Source/Core/Common/FileUtil.cpp | 4 +-- Source/Core/Common/FileUtil.h | 2 +- .../Core/ConfigLoaders/BaseConfigLoader.cpp | 2 +- .../Core/ConfigLoaders/IsSettingSaveable.cpp | 2 +- Source/Core/DolphinQt/CMakeLists.txt | 4 +-- .../ControllerInterfaceWindow.cpp | 10 +++--- .../ControllerInterfaceWindow.h | 8 ++--- ...idget.cpp => DualShockUDPClientWidget.cpp} | 26 +++++++-------- ...verWidget.h => DualShockUDPClientWidget.h} | 4 +-- Source/Core/DolphinQt/DolphinQt.vcxproj | 6 ++-- Source/Core/InputCommon/CMakeLists.txt | 6 ++-- .../ControllerInterface.cpp | 16 +++++----- .../ControllerInterface/ControllerInterface.h | 2 +- .../DualShockUDPClient.cpp} | 32 +++++++++---------- .../DualShockUDPClient.h} | 4 +-- .../DualShockUDPProto.h} | 8 ++--- Source/Core/InputCommon/InputCommon.vcxproj | 6 ++-- .../InputCommon/InputCommon.vcxproj.filters | 24 +++++++------- 21 files changed, 85 insertions(+), 87 deletions(-) rename Source/Core/DolphinQt/Config/ControllerInterface/{CemuHookUDPServerWidget.cpp => DualShockUDPClientWidget.cpp} (65%) rename Source/Core/DolphinQt/Config/ControllerInterface/{CemuHookUDPServerWidget.h => DualShockUDPClientWidget.h} (79%) rename Source/Core/InputCommon/ControllerInterface/{CemuHookUDPServer/CemuHookUDPServer.cpp => DualShockUDPClient/DualShockUDPClient.cpp} (92%) rename Source/Core/InputCommon/ControllerInterface/{CemuHookUDPServer/CemuHookUDPServer.h => DualShockUDPClient/DualShockUDPClient.h} (83%) rename Source/Core/InputCommon/ControllerInterface/{CemuHookUDPServer/CemuHookUDPServerProto.h => DualShockUDPClient/DualShockUDPProto.h} (95%) diff --git a/Source/Core/Common/CommonPaths.h b/Source/Core/Common/CommonPaths.h index 3ca7f35ab0..46a201d823 100644 --- a/Source/Core/Common/CommonPaths.h +++ b/Source/Core/Common/CommonPaths.h @@ -85,7 +85,7 @@ #define GFX_CONFIG "GFX.ini" #define DEBUGGER_CONFIG "Debugger.ini" #define LOGGER_CONFIG "Logger.ini" -#define CEMUHOOKUDPSERVER_CONFIG "UDPServer.ini" +#define DUALSHOCKUDPCLIENT_CONFIG "DSUClient.ini" // Files in the directory returned by GetUserPath(D_LOGS_IDX) #define MAIN_LOG "dolphin.log" diff --git a/Source/Core/Common/Config/Config.cpp b/Source/Core/Common/Config/Config.cpp index 265da19cff..b65b1d6fad 100644 --- a/Source/Core/Common/Config/Config.cpp +++ b/Source/Core/Common/Config/Config.cpp @@ -141,7 +141,7 @@ static const std::map system_to_name = { {System::Logger, "Logger"}, {System::Debugger, "Debugger"}, {System::SYSCONF, "SYSCONF"}, - {System::CemuHookUdpServer, "CemuHookUdpServer"}}; + {System::DualShockUDPClient, "DualShockUDPClient"}}; const std::string& GetSystemName(System system) { diff --git a/Source/Core/Common/Config/Enums.h b/Source/Core/Common/Config/Enums.h index ff5f543925..831726ae1e 100644 --- a/Source/Core/Common/Config/Enums.h +++ b/Source/Core/Common/Config/Enums.h @@ -30,7 +30,7 @@ enum class System GFX, Logger, Debugger, - CemuHookUdpServer, + DualShockUDPClient, }; constexpr std::array SEARCH_ORDER{{ diff --git a/Source/Core/Common/FileUtil.cpp b/Source/Core/Common/FileUtil.cpp index 965247cba4..dfc3658db1 100644 --- a/Source/Core/Common/FileUtil.cpp +++ b/Source/Core/Common/FileUtil.cpp @@ -794,8 +794,8 @@ static void RebuildUserDirectories(unsigned int dir_index) s_user_paths[F_GFXCONFIG_IDX] = s_user_paths[D_CONFIG_IDX] + GFX_CONFIG; s_user_paths[F_DEBUGGERCONFIG_IDX] = s_user_paths[D_CONFIG_IDX] + DEBUGGER_CONFIG; s_user_paths[F_LOGGERCONFIG_IDX] = s_user_paths[D_CONFIG_IDX] + LOGGER_CONFIG; - s_user_paths[F_CEMUHOOKUDPSERVERCONFIG_IDX] = - s_user_paths[D_CONFIG_IDX] + CEMUHOOKUDPSERVER_CONFIG; + s_user_paths[F_DUALSHOCKUDPCLIENTCONFIG_IDX] = + s_user_paths[D_CONFIG_IDX] + DUALSHOCKUDPCLIENT_CONFIG; s_user_paths[F_MAINLOG_IDX] = s_user_paths[D_LOGS_IDX] + MAIN_LOG; s_user_paths[F_MEM1DUMP_IDX] = s_user_paths[D_DUMP_IDX] + MEM1_DUMP; s_user_paths[F_MEM2DUMP_IDX] = s_user_paths[D_DUMP_IDX] + MEM2_DUMP; diff --git a/Source/Core/Common/FileUtil.h b/Source/Core/Common/FileUtil.h index 7a956e1200..ccabf7fdfe 100644 --- a/Source/Core/Common/FileUtil.h +++ b/Source/Core/Common/FileUtil.h @@ -70,7 +70,7 @@ enum F_MEMORYWATCHERLOCATIONS_IDX, F_MEMORYWATCHERSOCKET_IDX, F_WIISDCARD_IDX, - F_CEMUHOOKUDPSERVERCONFIG_IDX, + F_DUALSHOCKUDPCLIENTCONFIG_IDX, NUM_PATH_INDICES }; diff --git a/Source/Core/Core/ConfigLoaders/BaseConfigLoader.cpp b/Source/Core/Core/ConfigLoaders/BaseConfigLoader.cpp index 813e898c20..e8ac86b423 100644 --- a/Source/Core/Core/ConfigLoaders/BaseConfigLoader.cpp +++ b/Source/Core/Core/ConfigLoaders/BaseConfigLoader.cpp @@ -89,7 +89,7 @@ const std::map system_to_ini = { {Config::System::GFX, F_GFXCONFIG_IDX}, {Config::System::Logger, F_LOGGERCONFIG_IDX}, {Config::System::Debugger, F_DEBUGGERCONFIG_IDX}, - {Config::System::CemuHookUdpServer, F_CEMUHOOKUDPSERVERCONFIG_IDX}, + {Config::System::DualShockUDPClient, F_DUALSHOCKUDPCLIENTCONFIG_IDX}, }; // INI layer configuration loader diff --git a/Source/Core/Core/ConfigLoaders/IsSettingSaveable.cpp b/Source/Core/Core/ConfigLoaders/IsSettingSaveable.cpp index 7c3ac70b70..9483aed414 100644 --- a/Source/Core/Core/ConfigLoaders/IsSettingSaveable.cpp +++ b/Source/Core/Core/ConfigLoaders/IsSettingSaveable.cpp @@ -16,7 +16,7 @@ namespace ConfigLoaders { bool IsSettingSaveable(const Config::ConfigLocation& config_location) { - if (config_location.system == Config::System::CemuHookUdpServer) + if (config_location.system == Config::System::DualShockUDPClient) return true; if (config_location.system == Config::System::Logger) diff --git a/Source/Core/DolphinQt/CMakeLists.txt b/Source/Core/DolphinQt/CMakeLists.txt index 783cefbb68..8c6936d10d 100644 --- a/Source/Core/DolphinQt/CMakeLists.txt +++ b/Source/Core/DolphinQt/CMakeLists.txt @@ -51,8 +51,8 @@ add_executable(dolphin-emu Config/CheatCodeEditor.h Config/CheatWarningWidget.cpp Config/CheatWarningWidget.h - Config/ControllerInterface/CemuHookUDPServerWidget.cpp - Config/ControllerInterface/CemuHookUDPServerWidget.h + Config/ControllerInterface/DualShockUDPClientWidget.cpp + Config/ControllerInterface/DualShockUDPClientWidget.h Config/ControllerInterface/ControllerInterfaceWindow.cpp Config/ControllerInterface/ControllerInterfaceWindow.h Config/ControllersWindow.cpp diff --git a/Source/Core/DolphinQt/Config/ControllerInterface/ControllerInterfaceWindow.cpp b/Source/Core/DolphinQt/Config/ControllerInterface/ControllerInterfaceWindow.cpp index 1ea5501e7a..991e84c8f9 100644 --- a/Source/Core/DolphinQt/Config/ControllerInterface/ControllerInterfaceWindow.cpp +++ b/Source/Core/DolphinQt/Config/ControllerInterface/ControllerInterfaceWindow.cpp @@ -9,8 +9,8 @@ #include #include -#if defined(CIFACE_USE_CEMUHOOKUDPSERVER) -#include "DolphinQt/Config/ControllerInterface/CemuHookUDPServerWidget.h" +#if defined(CIFACE_USE_DUALSHOCKUDPCLIENT) +#include "DolphinQt/Config/ControllerInterface/DualShockUDPClientWidget.h" #endif ControllerInterfaceWindow::ControllerInterfaceWindow(QWidget* parent) : QDialog(parent) @@ -27,9 +27,9 @@ void ControllerInterfaceWindow::CreateMainLayout() connect(m_button_box, &QDialogButtonBox::rejected, this, &QDialog::reject); m_tab_widget = new QTabWidget(); -#if defined(CIFACE_USE_CEMUHOOKUDPSERVER) - m_udpserver_widget = new CemuHookUDPServerWidget(); - m_tab_widget->addTab(m_udpserver_widget, tr("UDPServer")); // TODO: use GetWrappedWidget()? +#if defined(CIFACE_USE_DUALSHOCKUDPCLIENT) + m_dsuclient_widget = new DualShockUDPClientWidget(); + m_tab_widget->addTab(m_dsuclient_widget, tr("DSU Client")); // TODO: use GetWrappedWidget()? #endif auto* main_layout = new QVBoxLayout(); diff --git a/Source/Core/DolphinQt/Config/ControllerInterface/ControllerInterfaceWindow.h b/Source/Core/DolphinQt/Config/ControllerInterface/ControllerInterfaceWindow.h index 47d12a9199..792cc97c25 100644 --- a/Source/Core/DolphinQt/Config/ControllerInterface/ControllerInterfaceWindow.h +++ b/Source/Core/DolphinQt/Config/ControllerInterface/ControllerInterfaceWindow.h @@ -8,8 +8,8 @@ #include "InputCommon/ControllerInterface/ControllerInterface.h" -#if defined(CIFACE_USE_CEMUHOOKUDPSERVER) -class CemuHookUDPServerWidget; +#if defined(CIFACE_USE_DUALSHOCKUDPCLIENT) +class DualShockUDPClientWidget; #endif class QTabWidget; class QDialogButtonBox; @@ -26,7 +26,7 @@ private: QTabWidget* m_tab_widget; QDialogButtonBox* m_button_box; -#if defined(CIFACE_USE_CEMUHOOKUDPSERVER) - CemuHookUDPServerWidget* m_udpserver_widget; +#if defined(CIFACE_USE_DUALSHOCKUDPCLIENT) + DualShockUDPClientWidget* m_dsuclient_widget; #endif }; diff --git a/Source/Core/DolphinQt/Config/ControllerInterface/CemuHookUDPServerWidget.cpp b/Source/Core/DolphinQt/Config/ControllerInterface/DualShockUDPClientWidget.cpp similarity index 65% rename from Source/Core/DolphinQt/Config/ControllerInterface/CemuHookUDPServerWidget.cpp rename to Source/Core/DolphinQt/Config/ControllerInterface/DualShockUDPClientWidget.cpp index 47ab3d71b7..965f2f6879 100644 --- a/Source/Core/DolphinQt/Config/ControllerInterface/CemuHookUDPServerWidget.cpp +++ b/Source/Core/DolphinQt/Config/ControllerInterface/DualShockUDPClientWidget.cpp @@ -2,7 +2,7 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. -#include "DolphinQt/Config/ControllerInterface/CemuHookUDPServerWidget.h" +#include "DolphinQt/Config/ControllerInterface/DualShockUDPClientWidget.h" #include #include @@ -12,33 +12,33 @@ #include #include "Common/Config/Config.h" -#include "InputCommon/ControllerInterface/CemuHookUDPServer/CemuHookUDPServer.h" +#include "InputCommon/ControllerInterface/DualShockUDPClient/DualShockUDPClient.h" -CemuHookUDPServerWidget::CemuHookUDPServerWidget() +DualShockUDPClientWidget::DualShockUDPClientWidget() { CreateWidgets(); ConnectWidgets(); } -void CemuHookUDPServerWidget::CreateWidgets() +void DualShockUDPClientWidget::CreateWidgets() { auto* main_layout = new QGridLayout; m_server_enabled = new QCheckBox(tr("Enable")); - m_server_enabled->setChecked(Config::Get(ciface::CemuHookUDPServer::Settings::SERVER_ENABLED)); + m_server_enabled->setChecked(Config::Get(ciface::DualShockUDPClient::Settings::SERVER_ENABLED)); m_server_address = new QLineEdit( - QString::fromStdString(Config::Get(ciface::CemuHookUDPServer::Settings::SERVER_ADDRESS))); + QString::fromStdString(Config::Get(ciface::DualShockUDPClient::Settings::SERVER_ADDRESS))); m_server_port = new QSpinBox(); m_server_port->setMaximum(65535); - m_server_port->setValue(Config::Get(ciface::CemuHookUDPServer::Settings::SERVER_PORT)); + m_server_port->setValue(Config::Get(ciface::DualShockUDPClient::Settings::SERVER_PORT)); auto* description = - new QLabel(tr("UDPServer protocol enables the use of input and motion data from compatible " + new QLabel(tr("DSU protocol enables the use of input and motion data from compatible " "sources, like PlayStation, Nintendo Switch and Steam controllers.

" "For setup instructions, " - "" + "" "refer to this page.")); description->setTextFormat(Qt::RichText); description->setWordWrap(true); @@ -55,21 +55,21 @@ void CemuHookUDPServerWidget::CreateWidgets() setLayout(main_layout); } -void CemuHookUDPServerWidget::ConnectWidgets() +void DualShockUDPClientWidget::ConnectWidgets() { connect(m_server_enabled, &QCheckBox::toggled, this, [this] { - Config::SetBaseOrCurrent(ciface::CemuHookUDPServer::Settings::SERVER_ENABLED, + Config::SetBaseOrCurrent(ciface::DualShockUDPClient::Settings::SERVER_ENABLED, m_server_enabled->isChecked()); }); connect(m_server_address, &QLineEdit::editingFinished, this, [this] { - Config::SetBaseOrCurrent(ciface::CemuHookUDPServer::Settings::SERVER_ADDRESS, + Config::SetBaseOrCurrent(ciface::DualShockUDPClient::Settings::SERVER_ADDRESS, m_server_address->text().toStdString()); }); connect(m_server_port, static_cast(&QSpinBox::valueChanged), this, [this] { - Config::SetBaseOrCurrent(ciface::CemuHookUDPServer::Settings::SERVER_PORT, + Config::SetBaseOrCurrent(ciface::DualShockUDPClient::Settings::SERVER_PORT, static_cast(m_server_port->value())); }); } diff --git a/Source/Core/DolphinQt/Config/ControllerInterface/CemuHookUDPServerWidget.h b/Source/Core/DolphinQt/Config/ControllerInterface/DualShockUDPClientWidget.h similarity index 79% rename from Source/Core/DolphinQt/Config/ControllerInterface/CemuHookUDPServerWidget.h rename to Source/Core/DolphinQt/Config/ControllerInterface/DualShockUDPClientWidget.h index 24a0db18ac..22e5a88011 100644 --- a/Source/Core/DolphinQt/Config/ControllerInterface/CemuHookUDPServerWidget.h +++ b/Source/Core/DolphinQt/Config/ControllerInterface/DualShockUDPClientWidget.h @@ -10,11 +10,11 @@ class QCheckBox; class QLineEdit; class QSpinBox; -class CemuHookUDPServerWidget final : public QWidget +class DualShockUDPClientWidget final : public QWidget { Q_OBJECT public: - explicit CemuHookUDPServerWidget(); + explicit DualShockUDPClientWidget(); private: void CreateWidgets(); diff --git a/Source/Core/DolphinQt/DolphinQt.vcxproj b/Source/Core/DolphinQt/DolphinQt.vcxproj index 90b334266a..13922e2894 100644 --- a/Source/Core/DolphinQt/DolphinQt.vcxproj +++ b/Source/Core/DolphinQt/DolphinQt.vcxproj @@ -106,7 +106,7 @@ - + @@ -189,7 +189,7 @@ - + @@ -295,7 +295,7 @@ - + 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 similarity index 92% rename from Source/Core/InputCommon/ControllerInterface/CemuHookUDPServer/CemuHookUDPServer.cpp rename to 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 #include @@ -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 SERVER_ENABLED{ - {Config::System::CemuHookUdpServer, "Server", "Enabled"}, false}; + {Config::System::DualShockUDPClient, "Server", "Enabled"}, false}; const Config::ConfigInfo SERVER_ADDRESS{ - {Config::System::CemuHookUdpServer, "Server", "IPAddress"}, DEFAULT_SERVER_ADDRESS}; -const Config::ConfigInfo SERVER_PORT{{Config::System::CemuHookUdpServer, "Server", "Port"}, + {Config::System::DualShockUDPClient, "Server", "IPAddress"}, DEFAULT_SERVER_ADDRESS}; +const Config::ConfigInfo 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 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 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 similarity index 83% rename from Source/Core/InputCommon/ControllerInterface/CemuHookUDPServer/CemuHookUDPServer.h rename to 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 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 similarity index 95% rename from Source/Core/InputCommon/ControllerInterface/CemuHookUDPServer/CemuHookUDPServerProto.h rename to 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 @@ - + @@ -100,8 +100,6 @@ - - @@ -109,6 +107,8 @@ + + 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 @@ {07bad1aa-7e03-4f5c-ade2-a44857c5cbc3} - - {4f71c21c-85eb-4e76-ad64-40fd97bc3d6d} + + {ff02580e-3a62-4de4-a135-3a6c2c339a90} @@ -126,15 +126,15 @@ ControllerEmu\ControlGroup - - ControllerInterface\CemuHookUDPServer - ControllerEmu\ControlGroup ControllerEmu\ControlGroup + + ControllerInterface\DualShockUDPClient + @@ -224,9 +224,6 @@ ControllerInterface - - ControllerInterface - ControllerEmu\ControlGroup @@ -234,17 +231,18 @@ ControllerEmu\ControlGroup - - ControllerInterface\CemuHookUDPServer - ControllerEmu\ControlGroup ControllerEmu\ControlGroup - - ControllerInterface\CemuHookUDPServer + + + ControllerInterface\DualShockUDPClient + + + ControllerInterface\DualShockUDPClient