project_files/HedgewarsMobile/Classes/CreationChamber.m
changeset 5207 4c9ae0f484da
parent 5206 db775bddf771
child 5376 ea8a74951948
--- a/project_files/HedgewarsMobile/Classes/CreationChamber.m	Wed May 11 01:26:38 2011 +0200
+++ b/project_files/HedgewarsMobile/Classes/CreationChamber.m	Thu May 12 23:00:26 2011 +0200
@@ -30,8 +30,12 @@
     [settings setObject:[NSNumber numberWithBool:NO] forKey:@"classic_menu"];
     [settings setObject:[NSNumber numberWithBool:YES] forKey:@"enhanced"];
     [settings setObject:[NSNumber numberWithBool:YES] forKey:@"multitasking"];
-    [settings setObject:@"" forKey:@"username"];
-    [settings setObject:@"" forKey:@"password"];
+
+    // don't overwrite these two strings when present
+    if ([settings objectForKey:@"username"] == nil)
+        [settings setObject:@"" forKey:@"username"];
+    if ([settings objectForKey:@"password"] == nil)
+        [settings setObject:@"" forKey:@"password"];
 
     [settings synchronize];
 }