ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/SheepShaver/src/MacOSX/Launcher/VMSettingsController.mm
(Generate patch)

Comparing SheepShaver/src/MacOSX/Launcher/VMSettingsController.mm (file contents):
Revision 1.4 by asvitkine, 2009-08-06T18:12:24Z vs.
Revision 1.8 by asvitkine, 2010-07-27T02:57:10Z

# Line 18 | Line 18
18   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19   */
20  
21 #import "VMSettingsController.h"
22
21   #import "sysdeps.h"
22   #import "prefs.h"
23  
24 + // The _UINT64 define is needed to guard against a typedef mismatch with Snow Leopard headers.
25 + #define _UINT64
26 +
27 + #import "VMSettingsController.h"
28 +
29   const int CDROMRefNum = -62;                    // RefNum of driver
30  
31 + #ifdef STANDALONE_PREFS
32   void prefs_init()
33   {
34   }
# Line 32 | Line 36 | void prefs_init()
36   void prefs_exit()
37   {
38   }
39 + #endif
40  
41   @implementation VMSettingsController
42  
# Line 169 | Line 174 | static NSString *getStringFromPrefs(cons
174    [NSApp runModalForWindow:window];
175   }
176  
177 + - (void) editSettingsForNewVM: (NSString *) vmdir sender: (id) sender
178 + {
179 +  chdir([vmdir fileSystemRepresentation]);
180 +  AddPrefsDefaults();
181 +  AddPlatformPrefsDefaults();
182 +  LoadPrefs([vmdir fileSystemRepresentation]);
183 +  PrefsReplaceString("screen", "win/800/600");
184 +  PrefsReplaceString("extfs", "");
185 +  PrefsReplaceString("ether", "slirp");
186 +  PrefsReplaceInt32("ramsize", 64 << 20);
187 +  PrefsReplaceInt32("frameskip", 2);
188 +  PrefsReplaceBool("jit", true);
189 +  NSWindow *window = [self window];
190 +  [self setupGUI];
191 +  [NSApp runModalForWindow:window];
192 + }
193 +
194   static NSString *makeRelativeIfNecessary(NSString *path)
195   {
196    char cwd[1024], filename[1024];
# Line 316 | Line 338 | static NSString *makeRelativeIfNecessary
338  
339   - (void) cancelEdit: (id) sender
340   {
341 + #ifdef STANDALONE_PREFS
342    PrefsExit();
343 + #endif
344    [[self window] close];
345    [NSApp stopModal];
346    cancelWasClicked = YES;
# Line 373 | Line 397 | static NSString *makeRelativeIfNecessary
397    PrefsReplaceString("serialb", [[printerPort stringValue] UTF8String]);
398    PrefsReplaceString("ether", [[ethernetInterface stringValue] UTF8String]);
399    SavePrefs();
400 + #ifdef STANDALONE_PREFS
401    PrefsExit();
402 + #endif
403  
404    [[self window] close];
405    [NSApp stopModal];

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines