mirror of
https://github.com/afska/gba-link-connection.git
synced 2026-10-02 13:56:42 -05:00
Improving LinkMobile example: Now it hangs up when a p2p connection is closed
This commit is contained in:
@@ -174,6 +174,12 @@ void handleP2P() {
|
||||
}
|
||||
|
||||
if (dataTransfer.completed) {
|
||||
if (!dataTransfer.success) {
|
||||
// Hang up when a transfer fails
|
||||
linkMobile->hangUp();
|
||||
return;
|
||||
}
|
||||
|
||||
// Save a copy of last received data
|
||||
if (dataTransfer.size > 0)
|
||||
lastCompletedTransfer = dataTransfer;
|
||||
|
||||
Reference in New Issue
Block a user