NetPlay: Use std::array for the pad mappings
This commit is contained in:
parent
e3ffb2dd16
commit
b1af2a6bbc
|
@ -121,8 +121,8 @@ protected:
|
|||
|
||||
u32 m_current_game;
|
||||
|
||||
PadMapping m_pad_map[4];
|
||||
PadMapping m_wiimote_map[4];
|
||||
PadMappingArray m_pad_map;
|
||||
PadMappingArray m_wiimote_map;
|
||||
|
||||
bool m_is_recording;
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
#include <vector>
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Core/HW/EXI_Device.h"
|
||||
|
@ -77,8 +78,9 @@ enum
|
|||
using NetWiimote = std::vector<u8>;
|
||||
using MessageId = u8;
|
||||
using PlayerId = u8;
|
||||
using PadMapping = s8;
|
||||
using FrameNum = u32;
|
||||
using PadMapping = s8;
|
||||
using PadMappingArray = std::array<PadMapping, 4>;
|
||||
|
||||
namespace NetPlay
|
||||
{
|
||||
|
|
|
@ -74,8 +74,9 @@ NetPlayServer::NetPlayServer(const u16 port, bool traversal, const std::string&
|
|||
PanicAlertT("Enet Didn't Initialize");
|
||||
}
|
||||
|
||||
memset(m_pad_map, -1, sizeof(m_pad_map));
|
||||
memset(m_wiimote_map, -1, sizeof(m_wiimote_map));
|
||||
m_pad_map.fill(-1);
|
||||
m_wiimote_map.fill(-1);
|
||||
|
||||
if (traversal)
|
||||
{
|
||||
if (!EnsureTraversalClient(centralServer, centralPort))
|
||||
|
|
|
@ -95,8 +95,8 @@ private:
|
|||
bool m_update_pings;
|
||||
u32 m_current_game;
|
||||
unsigned int m_target_buffer_size;
|
||||
PadMapping m_pad_map[4];
|
||||
PadMapping m_wiimote_map[4];
|
||||
PadMappingArray m_pad_map;
|
||||
PadMappingArray m_wiimote_map;
|
||||
|
||||
std::map<PlayerId, Client> m_players;
|
||||
|
||||
|
|
Loading…
Reference in New Issue