mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
NetPlay: Remove PadMapping type
Its usage was inconsistent, confusing, and buggy, so I opted to just remove it entirely. It has been replaced with PadIndex for the appropriate instances (mainly networking), and inappropriate usages (where it was really just a player ID) have been replaced with the PlayerId type. The definition of "no mapping" has been changed from -1 to 0 to match the defintion of "no player", as -1 (255 unsigned) is actually a valid player ID. The bugs never manifested because it only occurs with a full lobby of 255 players, at which point the last player's ID collides with the "no mapping" definition and some undefined behavior occurs. Nevertheless, I thought it best to fix it anyways as the usage of PadMapping was confusing.
This commit is contained in:
@ -184,8 +184,8 @@ using NetWiimote = std::vector<u8>;
|
||||
using MessageId = u8;
|
||||
using PlayerId = u8;
|
||||
using FrameNum = u32;
|
||||
using PadMapping = s8;
|
||||
using PadMappingArray = std::array<PadMapping, 4>;
|
||||
using PadIndex = s8;
|
||||
using PadMappingArray = std::array<PlayerId, 4>;
|
||||
|
||||
bool IsNetPlayRunning();
|
||||
// Precondition: A netplay client instance must be present. In other words,
|
||||
|
Reference in New Issue
Block a user