mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-20 00:05:47 +00:00
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>
51 lines
1.1 KiB
C++
51 lines
1.1 KiB
C++
// 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
|
|
|
|
#pragma once
|
|
|
|
#include <memory>
|
|
#include <QDialog>
|
|
#include <QFutureWatcher>
|
|
#include "yuzu/multiplayer/validation.h"
|
|
|
|
namespace Ui {
|
|
class DirectConnect;
|
|
}
|
|
|
|
namespace Core {
|
|
class System;
|
|
}
|
|
|
|
class DirectConnectWindow : public QDialog {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit DirectConnectWindow(Core::System& system_, QWidget* parent = nullptr);
|
|
~DirectConnectWindow();
|
|
|
|
void RetranslateUi();
|
|
|
|
signals:
|
|
/**
|
|
* Signalled by this widget when it is closing itself and destroying any state such as
|
|
* connections that it might have.
|
|
*/
|
|
void Closed();
|
|
void SaveConfig();
|
|
|
|
private slots:
|
|
void OnConnection();
|
|
|
|
private:
|
|
void Connect();
|
|
void BeginConnecting();
|
|
void EndConnecting();
|
|
|
|
QFutureWatcher<void>* watcher;
|
|
std::unique_ptr<Ui::DirectConnect> ui;
|
|
Validation validation;
|
|
Core::System& system;
|
|
};
|