mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-24 19:27:27 +00:00
pull 5287899c4d374b38a9ae870db33615b53f29a61e
This commit is contained in:
parent
dd4018cb0a
commit
ebccf3b2e9
3 changed files with 6 additions and 5 deletions
|
@ -885,7 +885,7 @@ void CEXISlippi::prepareCharacterFrameData(Slippi::FrameData* frame, u8 port, u8
|
||||||
source = isFollower ? frame->followers : frame->players;
|
source = isFollower ? frame->followers : frame->players;
|
||||||
|
|
||||||
// This must be updated if new data is added
|
// This must be updated if new data is added
|
||||||
int characterDataLen = 49;
|
int characterDataLen = 50;
|
||||||
|
|
||||||
// Check if player exists
|
// Check if player exists
|
||||||
if (!source.count(port))
|
if (!source.count(port))
|
||||||
|
@ -918,6 +918,7 @@ void CEXISlippi::prepareCharacterFrameData(Slippi::FrameData* frame, u8 port, u8
|
||||||
appendWordToBuffer(&m_read_queue, *(u32*)&data.facingDirection);
|
appendWordToBuffer(&m_read_queue, *(u32*)&data.facingDirection);
|
||||||
appendWordToBuffer(&m_read_queue, static_cast<u32>(data.animation));
|
appendWordToBuffer(&m_read_queue, static_cast<u32>(data.animation));
|
||||||
m_read_queue.push_back(data.joystickXRaw);
|
m_read_queue.push_back(data.joystickXRaw);
|
||||||
|
m_read_queue.push_back(data.joystickYRaw);
|
||||||
appendWordToBuffer(&m_read_queue, *(u32*)&data.percent);
|
appendWordToBuffer(&m_read_queue, *(u32*)&data.percent);
|
||||||
// NOTE TO DEV: If you add data here, make sure to increase the size above
|
// NOTE TO DEV: If you add data here, make sure to increase the size above
|
||||||
}
|
}
|
||||||
|
|
|
@ -255,14 +255,13 @@ void handlePreFrameUpdate(Game* game, uint32_t maxSize)
|
||||||
p.lTrigger = readFloat(data, idx, maxSize, 0);
|
p.lTrigger = readFloat(data, idx, maxSize, 0);
|
||||||
p.rTrigger = readFloat(data, idx, maxSize, 0);
|
p.rTrigger = readFloat(data, idx, maxSize, 0);
|
||||||
|
|
||||||
if (asmEvents[EVENT_PRE_FRAME_UPDATE] >= 59)
|
p.joystickXRaw = readByte(data, idx, maxSize, 0);
|
||||||
{
|
|
||||||
p.joystickXRaw = readByte(data, idx, maxSize, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
uint32_t noPercent = 0xFFFFFFFF;
|
uint32_t noPercent = 0xFFFFFFFF;
|
||||||
p.percent = readFloat(data, idx, maxSize, *(float*)(&noPercent));
|
p.percent = readFloat(data, idx, maxSize, *(float*)(&noPercent));
|
||||||
|
|
||||||
|
p.joystickYRaw = readByte(data, idx, maxSize, 0);
|
||||||
|
|
||||||
// Add player data to frame
|
// Add player data to frame
|
||||||
std::unordered_map<uint8_t, PlayerFrameData>* target;
|
std::unordered_map<uint8_t, PlayerFrameData>* target;
|
||||||
target = isFollower ? &frame->followers : &frame->players;
|
target = isFollower ? &frame->followers : &frame->players;
|
||||||
|
|
|
@ -68,6 +68,7 @@ typedef struct
|
||||||
float rTrigger;
|
float rTrigger;
|
||||||
|
|
||||||
uint8_t joystickXRaw;
|
uint8_t joystickXRaw;
|
||||||
|
uint8_t joystickYRaw;
|
||||||
} PlayerFrameData;
|
} PlayerFrameData;
|
||||||
|
|
||||||
typedef struct FrameData
|
typedef struct FrameData
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue