Skip to content

Commit

Permalink
SI_DeviceGBA: use SI_ERROR_NO_RESPONSE when client isn't connected
Browse files Browse the repository at this point in the history
Slight behavior change, but fills a gaping hole in the state logic.
  • Loading branch information
ligfx committed May 17, 2017
1 parent 0311eb1 commit c2503a4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Source/Core/Core/HW/SI/SI_DeviceGBA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "Core/HW/SI/SI_DeviceGBA.h"

#include <cstddef>
#include <cstring>
#include <memory>
#include <mutex>
#include <queue>
Expand Down Expand Up @@ -303,6 +304,12 @@ int CSIDevice_GBA::RunBuffer(u8* buffer, int length)
#endif
m_sock_server.Send(buffer);
}
else
{
constexpr u32 reply = SI_ERROR_NO_RESPONSE;
std::memcpy(buffer, &reply, sizeof(reply));
return sizeof(reply);
}
m_last_cmd = buffer[3];
m_timestamp_sent = CoreTiming::GetTicks();
m_state = ConnectionState::WaitForTransferTime;
Expand Down

0 comments on commit c2503a4

Please sign in to comment.