mirror of
https://github.com/libretro/Mesen.git
synced 2024-11-24 01:29:41 +00:00
e7e77ccfa7
Fixed exception throwing to be standard
32 lines
592 B
C++
32 lines
592 B
C++
#pragma once
|
|
|
|
#include "stdafx.h"
|
|
|
|
class ClientConnectionData
|
|
{
|
|
public:
|
|
string Host;
|
|
uint16_t Port;
|
|
|
|
string PlayerName;
|
|
uint8_t* AvatarData;
|
|
uint32_t AvatarSize;
|
|
|
|
ClientConnectionData(string host, uint16_t port, string playerName, uint8_t* avatarData, uint32_t avatarSize) :
|
|
Host(host), Port(port), PlayerName(playerName), AvatarSize(avatarSize)
|
|
{
|
|
if(avatarSize > 0) {
|
|
AvatarData = new uint8_t[avatarSize];
|
|
memcpy(AvatarData, avatarData, avatarSize);
|
|
} else {
|
|
AvatarData = nullptr;
|
|
}
|
|
}
|
|
|
|
~ClientConnectionData()
|
|
{
|
|
if(AvatarData) {
|
|
delete[] AvatarData;
|
|
}
|
|
}
|
|
}; |