Skip to content

Commit b5c6528

Browse files
committed
Add self disconnect to the online example
1 parent a6daa52 commit b5c6528

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

Examples/OnlineSession/OnlineSession.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,12 @@ int main(int argc, char* argv[]) {
186186
printf("runahead: %d\n", current_runahead);
187187
}
188188
break;
189+
case SDLK_F5:
190+
// leave the session, the game keeps running locally.
191+
if (gekko_disconnect_actor(session, local_players[0])) {
192+
printf("left the session\n");
193+
}
194+
break;
189195
}
190196
}
191197
}

0 commit comments

Comments
 (0)