diff options
| author | Aleksandr Popovich <alekpopo@pm.me> | 2025-06-05 18:59:47 +0000 |
|---|---|---|
| committer | crueter <crueter@noreply.localhost> | 2025-06-05 18:59:47 +0000 |
| commit | 76fa5255926da8f6339e7be5bf106646acedf78a (patch) | |
| tree | 8ea533a7d748a9a5404e15a1063b11a832b2f007 /src/yuzu/multiplayer/client_room.cpp | |
| parent | 7e13da47af71814d612c6c060be68e8ba84271ff (diff) | |
Added the public lobby to android. (#125)
This is adapted from kleidis old PR to Azahar. Changes from it:
- Fixed inconsistent button styling in the dialog for connection
- Allowed to hide both empty and full rooms.
- Proper serving of preferred games
- Enables web service for android by default
- Better implementation of multiplayer.cpp that works with oop
Also fixes the room network class and turns it into a static namespace
in network
Signed-off-by: Aleksandr Popovich <alekpopo@pm.me>
Co-authored-by: swurl <swurl@swurl.xyz>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/125
Co-authored-by: Aleksandr Popovich <alekpopo@pm.me>
Co-committed-by: Aleksandr Popovich <alekpopo@pm.me>
Diffstat (limited to 'src/yuzu/multiplayer/client_room.cpp')
| -rw-r--r-- | src/yuzu/multiplayer/client_room.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/yuzu/multiplayer/client_room.cpp b/src/yuzu/multiplayer/client_room.cpp index caf34a414f..3453ae34d5 100644 --- a/src/yuzu/multiplayer/client_room.cpp +++ b/src/yuzu/multiplayer/client_room.cpp @@ -1,6 +1,9 @@ // SPDX-FileCopyrightText: Copyright 2017 Citra Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later +// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + #include <future> #include <QColor> #include <QImage> @@ -18,14 +21,14 @@ #include "yuzu/multiplayer/moderation_dialog.h" #include "yuzu/multiplayer/state.h" -ClientRoomWindow::ClientRoomWindow(QWidget* parent, Network::RoomNetwork& room_network_) +ClientRoomWindow::ClientRoomWindow(QWidget* parent) : QDialog(parent, Qt::WindowTitleHint | Qt::WindowCloseButtonHint | Qt::WindowSystemMenuHint), - ui(std::make_unique<Ui::ClientRoom>()), room_network{room_network_} { + ui(std::make_unique<Ui::ClientRoom>()) { ui->setupUi(this); - ui->chat->Initialize(&room_network); + ui->chat->Initialize(); // setup the callbacks for network updates - if (auto member = room_network.GetRoomMember().lock()) { + if (auto member = Network::GetRoomMember().lock()) { member->BindOnRoomInformationChanged( [this](const Network::RoomInformation& info) { emit RoomInformationChanged(info); }); member->BindOnStateChanged( @@ -44,7 +47,7 @@ ClientRoomWindow::ClientRoomWindow(QWidget* parent, Network::RoomNetwork& room_n ui->disconnect->setDefault(false); ui->disconnect->setAutoDefault(false); connect(ui->moderation, &QPushButton::clicked, [this] { - ModerationDialog dialog(room_network, this); + ModerationDialog dialog(this); dialog.exec(); }); ui->moderation->setDefault(false); @@ -90,7 +93,7 @@ void ClientRoomWindow::Disconnect() { } void ClientRoomWindow::UpdateView() { - if (auto member = room_network.GetRoomMember().lock()) { + if (auto member = Network::GetRoomMember().lock()) { if (member->IsConnected()) { ui->chat->Enable(); ui->disconnect->setEnabled(true); |
