project_files/HedgewarsMobile/Classes/HedgewarsAppDelegate.m
changeset 6078 8c0cc07731e5
parent 6017 24631fd2fb9e
child 6208 b831679e9467
equal deleted inserted replaced
6077:d8fa5a85d24f 6078:8c0cc07731e5
    18  * File created on 13/03/2011.
    18  * File created on 13/03/2011.
    19  */
    19  */
    20 
    20 
    21 
    21 
    22 #import "HedgewarsAppDelegate.h"
    22 #import "HedgewarsAppDelegate.h"
    23 #import "PascalImports.h"
    23 #import "MainMenuViewController.h"
    24 #import "ObjcExports.h"
    24 #import "ObjcExports.h"
    25 #import "CommodityFunctions.h"
       
    26 #import "MainMenuViewController.h"
       
    27 #include <unistd.h>
    25 #include <unistd.h>
    28 
    26 
    29 
    27 
    30 @implementation SDLUIKitDelegate (customDelegate)
    28 @implementation SDLUIKitDelegate (customDelegate)
    31 
    29 
    95     // don't stop music when it is playing
    93     // don't stop music when it is playing
    96     if (self.isInGame) {
    94     if (self.isInGame) {
    97         [AudioManagerController cleanupMemory];
    95         [AudioManagerController cleanupMemory];
    98         MSG_MEMCLEAN();
    96         MSG_MEMCLEAN();
    99     }
    97     }
   100     print_free_memory();
       
   101     // don't clean mainMenuViewController here!!!
    98     // don't clean mainMenuViewController here!!!
   102 }
    99 }
   103 
   100 
   104 // true multitasking with sdl works only on 4.2 and above; we close the game to avoid a black screen at return
   101 // true multitasking with sdl works only on 4.2 and above; we close the game to avoid a black screen at return
   105 -(void) applicationWillResignActive:(UIApplication *)application {
   102 -(void) applicationWillResignActive:(UIApplication *)application {