Skip to content

Commit

Permalink
HW: Fix polling too frequently
Browse files Browse the repository at this point in the history
  • Loading branch information
endrift committed Dec 27, 2016
1 parent 1dba026 commit ed68c3c
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions Source/Core/Core/HW/SI_DeviceGBA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,16 +328,6 @@ int mGBACore::Receive(u8* si_buffer)
return 0;
}

s32 total_clocks_added = 0;
while (need_process)
{
WARN_LOG(SERIALINTERFACE, "GBA %01d is out of sync", device_number);
total_clocks_added += 512;
clocks_pending += 512;
ClockSync();
}
clocks_pending -= total_clocks_added;

if (num_received > 0)
{
#ifdef _DEBUG
Expand Down Expand Up @@ -458,9 +448,13 @@ int CSIDevice_GBA::RunBuffer(u8* _pBuffer, int _iLength)
NOTICE_LOG(SERIALINTERFACE, "JOY transfer finished on GBA %i", GetDeviceNumber());

waiting_for_response = false;
return num_data_received;
}
return 0;
if (num_data_received > 0)
return num_data_received;
} else
return 0;

reinterpret_cast<u32*>(_pBuffer)[0] = SI_ERROR_NO_RESPONSE;
return 4;
}

int CSIDevice_GBA::TransferInterval()
Expand Down

0 comments on commit ed68c3c

Please sign in to comment.