project_files/HedgewarsMobile/Classes/RestoreViewController.m
changeset 6008 215f0c9719e3
parent 6000 dbcebcd3d79f
child 6020 c792d4b3e080
equal deleted inserted replaced
6006:a211dcca5016 6008:215f0c9719e3
    40         if (self.interfaceBridge == nil) {
    40         if (self.interfaceBridge == nil) {
    41             GameInterfaceBridge *bridge = [[GameInterfaceBridge alloc] initWithController:self.parentViewController];
    41             GameInterfaceBridge *bridge = [[GameInterfaceBridge alloc] initWithController:self.parentViewController];
    42             self.interfaceBridge = bridge;
    42             self.interfaceBridge = bridge;
    43             [bridge release];
    43             [bridge release];
    44         }
    44         }
       
    45         // TODO: it is useless to keep the modalcontroller around when calling interfacebridge
       
    46         // but as long as it is an instance we mustn't release it beforehand
       
    47         // moreover in this way the stats don't show up :/
       
    48         [self.interfaceBridge startSaveGame:[defaults objectForKey:@"savedGamePath"]];
    45         [self.parentViewController dismissModalViewControllerAnimated:NO];
    49         [self.parentViewController dismissModalViewControllerAnimated:NO];
    46         [self.interfaceBridge startSaveGame:[defaults objectForKey:@"savedGamePath"]];
       
    47     } else {
    50     } else {
    48         [AudioManagerController playBackSound];
    51         [AudioManagerController playBackSound];
    49         [defaults setObject:@"" forKey:@"savedGamePath"];
    52         [defaults setObject:@"" forKey:@"savedGamePath"];
    50         [defaults synchronize];
    53         [defaults synchronize];
    51         [self.parentViewController dismissModalViewControllerAnimated:YES];
    54         [self.parentViewController dismissModalViewControllerAnimated:YES];