project_files/HedgewarsMobile/Classes/GameInterfaceBridge.m
changeset 6365 c992df555afb
parent 6353 d8f62c805619
child 6415 af2047bb4f70
equal deleted inserted replaced
6364:c6adb60239f4 6365:c992df555afb
    87 
    87 
    88     // the overlay is not needed any more and can be removed
    88     // the overlay is not needed any more and can be removed
    89     [[OverlayViewController mainOverlay] removeOverlay];
    89     [[OverlayViewController mainOverlay] removeOverlay];
    90 
    90 
    91     // engine thread *should* be done by now
    91     // engine thread *should* be done by now
    92     NSArray *stats = self.proto.statsArray;
    92     NSArray *stats = [[NSArray alloc] initWithArray:self.proto.statsArray copyItems:YES];
    93     if (stats != nil) {
    93     if ([HWUtils gameStatus] == gsEnded && stats != nil) {
    94         StatsPageViewController *statsPage = [[StatsPageViewController alloc] initWithStyle:UITableViewStyleGrouped];
    94         StatsPageViewController *statsPage = [[StatsPageViewController alloc] initWithStyle:UITableViewStyleGrouped];
    95         statsPage.statsArray = stats;
    95         statsPage.statsArray = stats;
    96         statsPage.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
    96         statsPage.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
    97         if ([statsPage respondsToSelector:@selector(setModalPresentationStyle:)])
    97         if ([statsPage respondsToSelector:@selector(setModalPresentationStyle:)])
    98             statsPage.modalPresentationStyle = UIModalPresentationPageSheet;
    98             statsPage.modalPresentationStyle = UIModalPresentationPageSheet;
    99 
    99 
   100         [callingController presentModalViewController:statsPage animated:YES];
   100         [callingController presentModalViewController:statsPage animated:YES];
   101         [statsPage release];
   101         [statsPage release];
   102     }
   102     }
   103     [stats release];    // we retained the array before
   103     [stats release];
   104 
   104 
   105     // can remove the savefile if the replay has ended
   105     // can remove the savefile if the replay has ended
   106     if ([HWUtils gameType] == gtSave)
   106     if ([HWUtils gameType] == gtSave)
   107         [[NSFileManager defaultManager] removeItemAtPath:self.savePath error:nil];
   107         [[NSFileManager defaultManager] removeItemAtPath:self.savePath error:nil];
   108 
   108