forked from dolphin-emu/dolphin
clang-format'ed over every touched file
This commit is contained in:
@@ -11,11 +11,11 @@
|
||||
#include "Core/HW/EXI/EXI_DeviceAGP.h"
|
||||
#include "Core/HW/EXI/EXI_DeviceDummy.h"
|
||||
#include "Core/HW/EXI/EXI_DeviceEthernetTAP.h"
|
||||
#include "Core/HW/EXI/EXI_DeviceEthernetTCP.h"
|
||||
#include "Core/HW/EXI/EXI_DeviceGecko.h"
|
||||
#include "Core/HW/EXI/EXI_DeviceIPL.h"
|
||||
#include "Core/HW/EXI/EXI_DeviceMemoryCard.h"
|
||||
#include "Core/HW/EXI/EXI_DeviceMic.h"
|
||||
#include "Core/HW/EXI/EXI_DeviceEthernetTCP.h"
|
||||
#include "Core/HW/Memmap.h"
|
||||
|
||||
namespace ExpansionInterface
|
||||
|
@@ -47,7 +47,6 @@ CEXIEthernetBase::CEXIEthernetBase()
|
||||
mac_addr = parsed.value();
|
||||
}
|
||||
|
||||
|
||||
memcpy(&m_bba_mem[BBA_NAFR_PAR0], mac_addr.data(), mac_addr.size());
|
||||
|
||||
// HACK: .. fully established 100BASE-T link
|
||||
@@ -582,4 +581,4 @@ wait_for_next:
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
} // namespace ExpansionInterface
|
||||
|
@@ -7,8 +7,8 @@
|
||||
#include <thread>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <vector>
|
||||
#include <Windows.h>
|
||||
#include <vector>
|
||||
#endif
|
||||
|
||||
#include "Common/Flag.h"
|
||||
|
@@ -2,12 +2,12 @@
|
||||
// Licensed under GPLv2+
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "Core/HW/EXI/EXI_DeviceEthernetTAP_Win32.h"
|
||||
#include "Common/Assert.h"
|
||||
#include "Common/Logging/Log.h"
|
||||
#include "Common/MsgHandler.h"
|
||||
#include "Common/StringUtil.h"
|
||||
#include "Core/HW/EXI/EXI_DeviceEthernetTAP.h"
|
||||
#include "Core/HW/EXI/EXI_DeviceEthernetTAP_Win32.h"
|
||||
|
||||
namespace Win32TAPHelper
|
||||
{
|
||||
|
@@ -39,7 +39,8 @@ bool CEXIEthernetTCP::Activate()
|
||||
DEBUG_LOG(SP1, "Connecting...");
|
||||
|
||||
m_socket = std::make_unique<sf::TcpSocket>();
|
||||
const sf::Socket::Status status = m_socket->connect(SConfig::GetInstance().m_bba_server, SConfig::GetInstance().m_bba_port);
|
||||
const sf::Socket::Status status =
|
||||
m_socket->connect(SConfig::GetInstance().m_bba_server, SConfig::GetInstance().m_bba_port);
|
||||
if (status != sf::Socket::Done)
|
||||
{
|
||||
ERROR_LOG(SP1, "Could not connect: %i", status);
|
||||
@@ -102,7 +103,11 @@ void CEXIEthernetTCP::ReadThreadHandler(CEXIEthernetTCP* self)
|
||||
selector.add(*self->m_socket);
|
||||
|
||||
// are we currently waiting for size (4 bytes) or payload?
|
||||
enum class SocketState { Size, Payload };
|
||||
enum class SocketState
|
||||
{
|
||||
Size,
|
||||
Payload
|
||||
};
|
||||
|
||||
SocketState state{SocketState::Size};
|
||||
|
||||
|
@@ -9,7 +9,10 @@
|
||||
#include "Common/Flag.h"
|
||||
#include "Core/HW/EXI/EXI_DeviceEthernetBase.h"
|
||||
|
||||
namespace sf { class TcpSocket; }
|
||||
namespace sf
|
||||
{
|
||||
class TcpSocket;
|
||||
}
|
||||
|
||||
namespace ExpansionInterface
|
||||
{
|
||||
|
@@ -4,17 +4,15 @@
|
||||
|
||||
#include "DolphinQt/BBAClient.h"
|
||||
|
||||
#include <QTcpSocket>
|
||||
#include <QHostAddress>
|
||||
#include <QDataStream>
|
||||
#include <QHostAddress>
|
||||
#include <QTcpSocket>
|
||||
|
||||
#include "DolphinQt/BBAServer.h"
|
||||
#include "DolphinQt/BBADebug.h"
|
||||
#include "DolphinQt/BBAServer.h"
|
||||
|
||||
BBAClient::BBAClient(QTcpSocket &socket, BBAServer &server) :
|
||||
QObject(&server),
|
||||
m_socket(socket),
|
||||
m_server(server)
|
||||
BBAClient::BBAClient(QTcpSocket& socket, BBAServer& server)
|
||||
: QObject(&server), m_socket(socket), m_server(server)
|
||||
{
|
||||
m_socket.setParent(this);
|
||||
connect(&m_socket, &QIODevice::readyRead, this, &BBAClient::ReadyRead);
|
||||
|
@@ -30,7 +30,8 @@ private slots:
|
||||
void ReadyRead();
|
||||
|
||||
private:
|
||||
enum class SocketState {
|
||||
enum class SocketState
|
||||
{
|
||||
Size,
|
||||
Payload
|
||||
};
|
||||
|
@@ -8,9 +8,7 @@
|
||||
|
||||
#include "DolphinQt/BBAServer.h"
|
||||
|
||||
BBADebug::BBADebug(BBAServer &server) :
|
||||
QDebug(&m_log_line),
|
||||
m_server(server)
|
||||
BBADebug::BBADebug(BBAServer& server) : QDebug(&m_log_line), m_server(server)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -4,17 +4,15 @@
|
||||
|
||||
#include "DolphinQt/BBAServer.h"
|
||||
|
||||
#include <QTcpServer>
|
||||
#include <QHostAddress>
|
||||
#include <QNetworkProxy>
|
||||
#include <QTcpServer>
|
||||
#include <QTimerEvent>
|
||||
|
||||
#include "DolphinQt/BBAClient.h"
|
||||
#include "DolphinQt/BBADebug.h"
|
||||
|
||||
BBAServer::BBAServer(QObject *parent) :
|
||||
QObject(parent),
|
||||
m_server(*new QTcpServer(this))
|
||||
BBAServer::BBAServer(QObject* parent) : QObject(parent), m_server(*new QTcpServer(this))
|
||||
{
|
||||
connect(&m_server, &QTcpServer::newConnection, this, &BBAServer::NewConnection);
|
||||
}
|
||||
@@ -25,7 +23,8 @@ bool BBAServer::Listen(const QHostAddress &address, quint16 port)
|
||||
if (result)
|
||||
LogInfo() << "Started listening on" << address << port;
|
||||
else
|
||||
LogInfo() << "Could not start listening on" << address << port << "because" << m_server.errorString();
|
||||
LogInfo() << "Could not start listening on" << address << port << "because"
|
||||
<< m_server.errorString();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@@ -4,23 +4,21 @@
|
||||
|
||||
#include "DolphinQt/BBAServerWindow.h"
|
||||
|
||||
#include <QVBoxLayout>
|
||||
#include <QDialogButtonBox>
|
||||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
#include <QLineEdit>
|
||||
#include <QSpinBox>
|
||||
#include <QPushButton>
|
||||
#include <QPlainTextEdit>
|
||||
#include <QDialogButtonBox>
|
||||
#include <QMessageBox>
|
||||
#include <QTime>
|
||||
#include <QPlainTextEdit>
|
||||
#include <QPushButton>
|
||||
#include <QScrollBar>
|
||||
#include <QSpinBox>
|
||||
#include <QTime>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
#include <limits>
|
||||
|
||||
BBAServerWindow::BBAServerWindow(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
m_server(this)
|
||||
BBAServerWindow::BBAServerWindow(QWidget* parent) : QDialog(parent), m_server(this)
|
||||
{
|
||||
auto* vbox_layout = new QVBoxLayout(this);
|
||||
|
||||
@@ -78,7 +76,8 @@ void BBAServerWindow::Toggle()
|
||||
else
|
||||
{
|
||||
if (!m_server.Listen(m_host_addr->text(), m_port->value()))
|
||||
QMessageBox::warning(this, tr("Could not start listening!"), tr("Could not start listening:\n\n%0").arg(m_server.ErrorString()));
|
||||
QMessageBox::warning(this, tr("Could not start listening!"),
|
||||
tr("Could not start listening:\n\n%0").arg(m_server.ErrorString()));
|
||||
}
|
||||
|
||||
Update();
|
||||
@@ -86,7 +85,8 @@ void BBAServerWindow::Toggle()
|
||||
|
||||
void BBAServerWindow::LogOutput(const QDateTime& timestamp, const QString& log_line)
|
||||
{
|
||||
m_log_output->appendPlainText(QStringLiteral("%0: %1").arg(timestamp.toString(QStringLiteral("HH:mm:ss.zzz")), log_line));
|
||||
m_log_output->appendPlainText(
|
||||
QStringLiteral("%0: %1").arg(timestamp.toString(QStringLiteral("HH:mm:ss.zzz")), log_line));
|
||||
auto* scroll_bar = m_log_output->verticalScrollBar();
|
||||
scroll_bar->setValue(scroll_bar->maximum());
|
||||
}
|
||||
|
@@ -9,7 +9,8 @@ int main(int argc, char **argv)
|
||||
|
||||
BBAServer server(&app);
|
||||
|
||||
QObject::connect(&server, &BBAServer::Information, [](const QDateTime ×tamp, const QString &logLine){
|
||||
QObject::connect(&server, &BBAServer::Information,
|
||||
[](const QDateTime& timestamp, const QString& logLine) {
|
||||
Q_UNUSED(timestamp)
|
||||
qInfo().noquote() << logLine;
|
||||
});
|
||||
|
@@ -4,20 +4,19 @@
|
||||
|
||||
#include "DolphinQt/Config/BBAConfigWidget.h"
|
||||
|
||||
#include <QVBoxLayout>
|
||||
#include <QDialogButtonBox>
|
||||
#include <QFormLayout>
|
||||
#include <QHBoxLayout>
|
||||
#include <QLineEdit>
|
||||
#include <QToolButton>
|
||||
#include <QLabel>
|
||||
#include <QSpinBox>
|
||||
#include <QDialogButtonBox>
|
||||
#include <QLineEdit>
|
||||
#include <QMessageBox>
|
||||
#include <QSpinBox>
|
||||
#include <QToolButton>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
#include "Common/Network.h"
|
||||
|
||||
BBAConfigWidget::BBAConfigWidget(bool show_server, QWidget* parent) :
|
||||
QDialog(parent)
|
||||
BBAConfigWidget::BBAConfigWidget(bool show_server, QWidget* parent) : QDialog(parent)
|
||||
{
|
||||
setWindowTitle(tr("Broadband Adapter Configuration"));
|
||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||
@@ -119,7 +118,8 @@ void BBAConfigWidget::Submit()
|
||||
|
||||
void BBAConfigWidget::GenerateMac()
|
||||
{
|
||||
m_mac_addr->setText(QString::fromStdString(Common::MacAddressToString(Common::GenerateMacAddress(Common::MACConsumer::BBA))));
|
||||
m_mac_addr->setText(QString::fromStdString(
|
||||
Common::MacAddressToString(Common::GenerateMacAddress(Common::MACConsumer::BBA))));
|
||||
}
|
||||
|
||||
void BBAConfigWidget::TextChanged(const QString& text)
|
||||
|
@@ -9,7 +9,8 @@
|
||||
class QLineEdit;
|
||||
class QSpinBox;
|
||||
|
||||
class BBAConfigWidget : public QDialog {
|
||||
class BBAConfigWidget : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
Reference in New Issue
Block a user