mirror of
https://github.com/libretro/Mesen.git
synced 2024-11-27 19:10:21 +00:00
30 lines
552 B
C++
30 lines
552 B
C++
#pragma once
|
|
#include "stdafx.h"
|
|
#include "NetMessage.h"
|
|
|
|
class InputDataMessage : public NetMessage
|
|
{
|
|
protected:
|
|
virtual uint32_t GetMessageLength()
|
|
{
|
|
return sizeof(InputState);
|
|
}
|
|
|
|
virtual void ProtectedSend(Socket &socket)
|
|
{
|
|
socket.BufferedSend((char*)&InputState, sizeof(InputState));
|
|
}
|
|
|
|
public:
|
|
uint8_t InputState;
|
|
|
|
InputDataMessage(char *readBuffer) : NetMessage(MessageType::InputData)
|
|
{
|
|
InputState = readBuffer[0];
|
|
}
|
|
|
|
InputDataMessage(uint8_t inputState) : NetMessage(MessageType::InputData)
|
|
{
|
|
InputState = inputState;
|
|
}
|
|
}; |