Mesen/Core/GameClient.h
Souryo 850102bbdc Input: Added support for ~20 new peripherals (Incomplete, more fixes/changes to come)
Movies: Rewrote format to support all IO devices and console types
Netplay: Now supports all IO devices and console types
2017-11-19 23:08:23 -05:00

38 lines
929 B
C++

#pragma once
#include "stdafx.h"
#include <thread>
#include "INotificationListener.h"
using std::thread;
class Socket;
class GameClientConnection;
class ClientConnectionData;
class GameClient : public INotificationListener
{
private:
static shared_ptr<GameClient> _instance;
unique_ptr<thread> _clientThread;
atomic<bool> _stop;
shared_ptr<GameClientConnection> _connection;
bool _connected = false;
static shared_ptr<GameClientConnection> GetConnection();
void PrivateConnect(shared_ptr<ClientConnectionData> connectionData);
void Exec();
public:
GameClient();
~GameClient();
static bool Connected();
static void Connect(shared_ptr<ClientConnectionData> connectionData);
static void Disconnect();
static void SelectController(uint8_t port);
static uint8_t GetControllerPort();
static uint8_t GetAvailableControllers();
void ProcessNotification(ConsoleNotificationType type, void* parameter) override;
};