recording: Linting pass on files involved in this change

This commit is contained in:
Tyler Wilding
2020-04-29 00:09:36 -04:00
committed by refractionpcsx2
parent c89e9134f6
commit bbc305d2b9
9 changed files with 199 additions and 218 deletions

View File

@@ -131,7 +131,7 @@ void InputRecording::ControllerInterrupt(u8 &data, u8 &port, u16 &bufCount, u8 b
bufVal = tmp;
// Update controller data state for future VirtualPad / logging usage.
padData[port]->UpdateControllerData(bufIndex, bufVal);
if (virtualPads[port] != NULL && virtualPads[port]->IsShown())
if (virtualPads[port] && virtualPads[port]->IsShown())
{
virtualPads[port]->UpdateControllerData(bufIndex, padData[port]);
}
@@ -143,7 +143,7 @@ void InputRecording::ControllerInterrupt(u8 &data, u8 &port, u16 &bufCount, u8 b
// Update controller data state for future VirtualPad / logging usage.
padData[port]->UpdateControllerData(bufIndex, bufVal);
if (virtualPads[port] != NULL && virtualPads[port]->IsShown())
if (virtualPads[port] && virtualPads[port]->IsShown())
{
// If the VirtualPad updated the PadData, we have to update the buffer
// before committing it to the recording / sending it to the game
@@ -154,9 +154,9 @@ void InputRecording::ControllerInterrupt(u8 &data, u8 &port, u16 &bufCount, u8 b
}
// If we have reached the end of the pad data, log it out
if (bufIndex == 17) { // TODO constant for end
padData[port]->LogPadData();
if (virtualPads[port] != NULL && virtualPads[port]->IsShown())
if (bufIndex == PadData::END_INDEX_CONTROLLER_BUFFER) {
padData[port]->LogPadData(port);
if (virtualPads[port] && virtualPads[port]->IsShown())
{
virtualPads[port]->Redraw();
}