mirror of
https://github.com/libretro/MesenCE.git
synced 2026-11-10 03:02:05 -10:00
* Code: Add auto-formatting rules for C++ projects (clang-format) and enforce code style via "clang-format" and "dotnet format" * fix ui format warnings
36 lines
875 B
C++
36 lines
875 B
C++
#pragma once
|
|
#include "pch.h"
|
|
#include "Shared/Interfaces/INotificationListener.h"
|
|
#include "Netplay/NetplayTypes.h"
|
|
|
|
class Socket;
|
|
class GameClientConnection;
|
|
class ClientConnectionData;
|
|
class Emulator;
|
|
|
|
class GameClient : public INotificationListener, public std::enable_shared_from_this<GameClient>
|
|
{
|
|
private:
|
|
Emulator* _emu;
|
|
unique_ptr<thread> _clientThread;
|
|
unique_ptr<GameClientConnection> _connection;
|
|
|
|
atomic<bool> _stop;
|
|
atomic<bool> _connected;
|
|
|
|
void Exec();
|
|
|
|
public:
|
|
GameClient(Emulator* emu);
|
|
virtual ~GameClient();
|
|
|
|
bool Connected();
|
|
void Connect(ClientConnectionData& connectionData);
|
|
void Disconnect();
|
|
|
|
void SelectController(NetplayControllerInfo controller);
|
|
NetplayControllerInfo GetControllerPort();
|
|
vector<NetplayControllerUsageInfo> GetControllerList();
|
|
|
|
void ProcessNotification(ConsoleNotificationType type, void* parameter) override;
|
|
}; |