project_files/HedgewarsMobile/Classes/GeneralSettingsViewController.m
changeset 6210 923c8414e3af
parent 6078 8c0cc07731e5
child 6276 1e2f8da1860a
--- a/project_files/HedgewarsMobile/Classes/GeneralSettingsViewController.m	Wed Oct 26 00:30:35 2011 +0200
+++ b/project_files/HedgewarsMobile/Classes/GeneralSettingsViewController.m	Wed Oct 26 01:17:44 2011 +0200
@@ -64,8 +64,9 @@
             theOtherSwitch = (UISwitch *)[self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:1 inSection:1]].accessoryView;
             [theOtherSwitch setOn:NO animated:YES];
 
-            if (theOtherSwitch.on)
-                [AudioManagerController pauseBackgroundMusic];
+            // since switching sound on won't turn music on anyways, we can always turn off music
+            [AudioManagerController pauseBackgroundMusic];
+            [settings setObject:[NSNumber numberWithBool:NO] forKey:@"music"];
             break;
         case 20:    //musicSwitch
             // if switch above (sound) is off, never turn on
@@ -80,7 +81,6 @@
                 [AudioManagerController playBackgroundMusic];
             else
                 [AudioManagerController pauseBackgroundMusic];
-
             break;
         case 30:    //alternateSwitch
             [settings setObject:[NSNumber numberWithBool:theSwitch.on] forKey:@"alternate"];