project_files/HedgewarsMobile/Classes/MapConfigViewController.m
changeset 3660 bc125bea5849
parent 3642 fb39fecca350
child 3662 a44406f4369b
equal deleted inserted replaced
3659:f8d5ac50e307 3660:bc125bea5849
    37     IPaddress ip;
    37     IPaddress ip;
    38     BOOL serverQuit = NO;
    38     BOOL serverQuit = NO;
    39     static uint8_t map[128*32];
    39     static uint8_t map[128*32];
    40     
    40     
    41     if (SDLNet_Init() < 0) {
    41     if (SDLNet_Init() < 0) {
    42         NSLog(@"SDLNet_Init: %s", SDLNet_GetError());
    42         DLog(@"SDLNet_Init: %s", SDLNet_GetError());
    43         serverQuit = YES;
    43         serverQuit = YES;
    44     }
    44     }
    45     
    45     
    46     // Resolving the host using NULL make network interface to listen
    46     // Resolving the host using NULL make network interface to listen
    47     if (SDLNet_ResolveHost(&ip, NULL, port) < 0) {
    47     if (SDLNet_ResolveHost(&ip, NULL, port) < 0) {
    48         NSLog(@"SDLNet_ResolveHost: %s\n", SDLNet_GetError());
    48         DLog(@"SDLNet_ResolveHost: %s\n", SDLNet_GetError());
    49         serverQuit = YES;
    49         serverQuit = YES;
    50     }
    50     }
    51     
    51     
    52     // Open a connection with the IP provided (listen on the host's port)
    52     // Open a connection with the IP provided (listen on the host's port)
    53     if (!(sd = SDLNet_TCP_Open(&ip))) {
    53     if (!(sd = SDLNet_TCP_Open(&ip))) {
    54         NSLog(@"SDLNet_TCP_Open: %s %\n", SDLNet_GetError(), port);
    54         DLog(@"SDLNet_TCP_Open: %s %\n", SDLNet_GetError(), port);
    55         serverQuit = YES;
    55         serverQuit = YES;
    56     }
    56     }
    57     
    57     
    58     // launch the preview here so that we're sure the tcp channel is open
    58     // launch the preview here so that we're sure the tcp channel is open
    59     pthread_t thread_id;
    59     pthread_t thread_id;