mirror of
https://github.com/afska/gba-link-connection.git
synced 2026-09-14 11:57:48 -05:00
Making LinkUniversal::send(...) return bool, honoring LinkWireless' response
This commit is contained in:
@@ -254,14 +254,16 @@ class LinkUniversal {
|
||||
|
||||
u16 peek(u8 playerId) { return incomingMessages[playerId].peek(); }
|
||||
|
||||
void send(u16 data) {
|
||||
bool send(u16 data) {
|
||||
if (data == LINK_CABLE_DISCONNECTED || data == LINK_CABLE_NO_DATA)
|
||||
return;
|
||||
return false;
|
||||
|
||||
if (mode == LINK_CABLE)
|
||||
if (mode == LINK_CABLE) {
|
||||
linkCable->send(data);
|
||||
else
|
||||
linkWireless->send(data);
|
||||
return true;
|
||||
} else {
|
||||
return linkWireless->send(data);
|
||||
}
|
||||
}
|
||||
|
||||
State getState() { return state; }
|
||||
|
||||
Reference in New Issue
Block a user