Fixed a bunch of the networking crashes and bugs appearing. All with just 5 lines...
authorKent Sutherland <ksuther@ithinksw.com>
Fri, 21 May 2004 01:24:04 +0000 (01:24 +0000)
committerKent Sutherland <ksuther@ithinksw.com>
Fri, 21 May 2004 01:24:04 +0000 (01:24 +0000)
MainController.m
MenuTunes.xcode/project.pbxproj

index dd7c51e..c235a8f 100755 (executable)
@@ -334,10 +334,6 @@ static MainController *sharedController;
 
 - (void)timerUpdate
 {
-    if ([networkController isConnectedToServer]) {
-        [statusItem setMenu:[menuController menu]];
-    }
-    
     if ( [self songChanged] && (timerUpdating != YES) && (playerRunningState == ITMTRemotePlayerRunning) ) {
         ITDebugLog(@"The song changed.");
         
@@ -394,6 +390,10 @@ static MainController *sharedController;
         timerUpdating = NO;
         [statusItem setEnabled:YES];
     }
+    
+    if ([networkController isConnectedToServer]) {
+        [statusItem setMenu:[menuController menu]];
+    }
 }
 
 - (void)menuClicked
@@ -1119,6 +1119,12 @@ static MainController *sharedController;
     [currentRemote release];
     currentRemote = [remoteArray objectAtIndex:0];
     [networkController disconnect];
+    
+    if ([[self currentRemote] playerRunningState] == ITMTRemotePlayerRunning) {
+        [self applicationLaunched:nil];
+    } else {
+        [self applicationTerminated:nil];
+    }
     [self timerUpdate];
     return YES;
 }
index 1788eee..ce13b91 100755 (executable)
                        buildRules = (
                        );
                        buildSettings = {
-                               FRAMEWORK_SEARCH_PATHS = "../ITFoundation/build ../ITKit/build /Volumes/Data/Desktop/ITFoundation/build";
+                               FRAMEWORK_SEARCH_PATHS = "../ITFoundation/build ../ITKit/build";
                                GCC_ENABLE_TRIGRAPHS = NO;
                                GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
                                GCC_PRECOMPILE_PREFIX_HEADER = YES;