~ubuntu-branches/ubuntu/feisty/basilisk2/feisty

« back to all changes in this revision

Viewing changes to src/MacOSX/prefs_macosx.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Smedegaard
  • Date: 2005-07-30 20:42:20 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050730204220-1nl1cg2jkjvy63ry
Tags: 0.9.20050730-1
* New upstream CVS snapshot.
* Build-depend on virtual libsdl-dev (not libsdl1.2-dev).
* Invoke init rules also on clean (to separate better from official
  builds).
* Update URL of upstream source in debian/copyright.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 *      $Id: prefs_macosx.cpp,v 1.3 2003/04/02 02:15:52 nigel Exp $
 
2
 *      $Id: prefs_macosx.cpp,v 1.9 2005/01/30 21:42:13 gbeauche Exp $
3
3
 *
4
 
 *  prefs_macosx.cpp - Preferences handling, Unix specific.
 
4
 *  prefs_macosx.cpp - Preferences handling, Mac OS X specific.
5
5
 *                                         Based on prefs_unix.cpp
6
6
 *
7
 
 *  Basilisk II (C) 1997-2002 Christian Bauer
 
7
 *  Basilisk II (C) 1997-2005 Christian Bauer
8
8
 *
9
9
 *  This program is free software; you can redistribute it and/or modify
10
10
 *  it under the terms of the GNU General Public License as published by
76
76
                // No prefs file, save defaults
77
77
                SavePrefs();
78
78
        }
 
79
 
 
80
        // Remove Nigel's bad old serial prefs
 
81
 
 
82
        const char      *str;
 
83
        int                     tmp = 0;
 
84
 
 
85
        if ( (str = PrefsFindString("seriala") ) != NULL
 
86
                                && strcmp(str, "/dev/ttys0") == 0 )
 
87
        {
 
88
                puts("Deleting invalid prefs item 'seriala /dev/ttys0'");
 
89
                PrefsRemoveItem("seriala", 1);
 
90
        }
 
91
 
 
92
        if ( (str = PrefsFindString("serialb") ) != NULL
 
93
                                && strcmp(str, "/dev/ttys1") == 0 )
 
94
        {
 
95
                puts("Deleting invalid prefs item 'serialb /dev/ttys1'");
 
96
                PrefsRemoveItem("serialb", 1);
 
97
        }
 
98
 
 
99
        // Floppy & cdrom prefs are always removed -
 
100
        // we search for them each time the emulator is started
 
101
 
 
102
        while ( (str = PrefsFindString("floppy", tmp) ) != NULL )
 
103
                PrefsRemoveItem("floppy", tmp);
 
104
 
 
105
        while ( (str = PrefsFindString("cdrom", tmp) ) != NULL )
 
106
                PrefsRemoveItem("cdrom", tmp);
79
107
}
80
108
 
81
109
 
100
128
 
101
129
void AddPlatformPrefsDefaults(void)
102
130
{
103
 
        PrefsReplaceString("extfs", "/");
 
131
        PrefsReplaceString("extfs",  getenv("HOME"));
104
132
        PrefsReplaceString("screen", "win/512/384/16");
105
133
#ifdef HAVE_SIGSEGV_SKIP_INSTRUCTION
106
134
        PrefsAddBool("ignoresegv", false);