project_files/HedgewarsMobile/Classes/SavedGamesViewController.m
changeset 5002 a9c44a8ffec8
parent 4976 088d40d8aba2
child 5156 641abe679bf0
equal deleted inserted replaced
5001:312f4dd41753 5002:a9c44a8ffec8
    18  * File created on 22/09/2010.
    18  * File created on 22/09/2010.
    19  */
    19  */
    20 
    20 
    21 
    21 
    22 #import "SavedGamesViewController.h"
    22 #import "SavedGamesViewController.h"
    23 #import "SDL_uikitappdelegate.h"
       
    24 #import "StatsPageViewController.h"
    23 #import "StatsPageViewController.h"
    25 #import "CommodityFunctions.h"
    24 #import "CommodityFunctions.h"
    26 
    25 
    27 @implementation SavedGamesViewController
    26 @implementation SavedGamesViewController
    28 @synthesize tableView, listOfSavegames;
    27 @synthesize tableView, listOfSavegames;
   226     // avoid showing the stat page immediately, but wait for 3 seconds
   225     // avoid showing the stat page immediately, but wait for 3 seconds
   227     [self performSelector:@selector(presentModalViewController:animated:) withObject:statsPage afterDelay:3];
   226     [self performSelector:@selector(presentModalViewController:animated:) withObject:statsPage afterDelay:3];
   228 
   227 
   229     NSArray *stats;
   228     NSArray *stats;
   230     if (IS_DUALHEAD()) {
   229     if (IS_DUALHEAD()) {
   231         stats = [[SDLUIKitDelegate sharedAppDelegate] startSDLgame:allDataNecessary];
   230         stats = [[HedgewarsAppDelegate sharedAppDelegate] startSDLgame:allDataNecessary];
   232         [self presentModalViewController:statsPage animated:NO];
   231         [self presentModalViewController:statsPage animated:NO];
   233     } else {
   232     } else {
   234         [self performSelector:@selector(presentModalViewController:animated:) withObject:statsPage afterDelay:3];
   233         [self performSelector:@selector(presentModalViewController:animated:) withObject:statsPage afterDelay:3];
   235         stats = [[SDLUIKitDelegate sharedAppDelegate] startSDLgame:allDataNecessary];
   234         stats = [[HedgewarsAppDelegate sharedAppDelegate] startSDLgame:allDataNecessary];
   236     }
   235     }
   237 
   236 
   238     if ([stats count] <= 1) {
   237     if ([stats count] <= 1) {
   239         DLog(@"%@",stats);
   238         DLog(@"%@",stats);
   240         [statsPage dismissModalViewControllerAnimated:NO];
   239         [statsPage dismissModalViewControllerAnimated:NO];