mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Rename all instances of "CemuhookUDPServer"/"UDPServer" to "DualShockUDPClient"/"DSUClient".
This commit is contained in:
@ -9,8 +9,8 @@
|
||||
#include <QTabWidget>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
#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();
|
||||
|
@ -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
|
||||
};
|
||||
|
@ -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 <QCheckBox>
|
||||
#include <QGridLayout>
|
||||
@ -12,33 +12,33 @@
|
||||
#include <QSpinBox>
|
||||
|
||||
#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.<br><br>"
|
||||
"For setup instructions, "
|
||||
"<a href=\"https://wiki.dolphin-emu.org/index.php?title=UDPServer\">"
|
||||
"<a href=\"https://wiki.dolphin-emu.org/index.php?title=DSU_Client\">"
|
||||
"refer to this page</a>."));
|
||||
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<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this,
|
||||
[this] {
|
||||
Config::SetBaseOrCurrent(ciface::CemuHookUDPServer::Settings::SERVER_PORT,
|
||||
Config::SetBaseOrCurrent(ciface::DualShockUDPClient::Settings::SERVER_PORT,
|
||||
static_cast<u16>(m_server_port->value()));
|
||||
});
|
||||
}
|
@ -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();
|
Reference in New Issue
Block a user