mirror of
https://github.com/kanjitalk755/macemu.git
synced 2025-02-21 18:28:59 +00:00
allow settings controller to work in non-standalone mode
This commit is contained in:
parent
a98f16a1bd
commit
3e7168c78d
@ -65,6 +65,7 @@
|
||||
|
||||
+ (id) sharedInstance;
|
||||
- (id) init;
|
||||
- (void) setupGUI;
|
||||
- (void) editSettingsFor: (NSString *) vmdir sender: (id) sender;
|
||||
- (IBAction) addDisk: (id) sender;
|
||||
- (IBAction) removeDisk: (id) sender;
|
||||
|
@ -25,6 +25,7 @@
|
||||
|
||||
const int CDROMRefNum = -62; // RefNum of driver
|
||||
|
||||
#ifdef STANDALONE_PREFS
|
||||
void prefs_init()
|
||||
{
|
||||
}
|
||||
@ -32,6 +33,7 @@ void prefs_init()
|
||||
void prefs_exit()
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
@implementation VMSettingsController
|
||||
|
||||
@ -316,7 +318,9 @@ static NSString *makeRelativeIfNecessary(NSString *path)
|
||||
|
||||
- (void) cancelEdit: (id) sender
|
||||
{
|
||||
#ifdef STANDALONE_PREFS
|
||||
PrefsExit();
|
||||
#endif
|
||||
[[self window] close];
|
||||
[NSApp stopModal];
|
||||
cancelWasClicked = YES;
|
||||
@ -373,7 +377,9 @@ static NSString *makeRelativeIfNecessary(NSString *path)
|
||||
PrefsReplaceString("serialb", [[printerPort stringValue] UTF8String]);
|
||||
PrefsReplaceString("ether", [[ethernetInterface stringValue] UTF8String]);
|
||||
SavePrefs();
|
||||
#ifdef STANDALONE_PREFS
|
||||
PrefsExit();
|
||||
#endif
|
||||
|
||||
[[self window] close];
|
||||
[NSApp stopModal];
|
||||
|
Loading…
x
Reference in New Issue
Block a user