Skip to content

Commit

Permalink
main.c: DEBUG-guard connect_rocket function
Browse files Browse the repository at this point in the history
  • Loading branch information
gustafla committed Sep 16, 2023
1 parent 8c46223 commit edc02f9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ static int poll_events(demo_t *demo, struct sync_device *rocket) {

// Connects rocket while keeping SDL events polled. Returns 1 when successful,
// 0 when unsuccessful.
#ifdef DEBUG
static int connect_rocket(struct sync_device *rocket, demo_t *demo) {
SDL_Log("Connecting to Rocket editor...\n");
while (sync_tcp_connect(rocket, "localhost", SYNC_DEFAULT_PORT)) {
Expand All @@ -85,6 +86,7 @@ static int connect_rocket(struct sync_device *rocket, demo_t *demo) {
SDL_Log("Connected.\n");
return 1;
}
#endif

int main(int argc, char *argv[]) {
// Initialize SDL
Expand Down

0 comments on commit edc02f9

Please sign in to comment.