ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/prefs.cpp
(Generate patch)

Comparing BasiliskII/src/prefs.cpp (file contents):
Revision 1.14 by cebix, 2004-01-12T15:29:22Z vs.
Revision 1.18 by asvitkine, 2009-07-23T19:19:14Z

# Line 1 | Line 1
1   /*
2   *  prefs.cpp - Preferences handling
3   *
4 < *  Basilisk II (C) 1997-2004 Christian Bauer
4 > *  Basilisk II (C) 1997-2008 Christian Bauer
5   *
6   *  This program is free software; you can redistribute it and/or modify
7   *  it under the terms of the GNU General Public License as published by
# Line 47 | Line 47 | static const prefs_desc *find_prefs_desc
47   *  Initialize preferences
48   */
49  
50 < void PrefsInit(int &argc, char **&argv)
50 > void PrefsInit(const char *vmdir, int &argc, char **&argv)
51   {
52          // Set defaults
53          AddPrefsDefaults();
54          AddPlatformPrefsDefaults();
55  
56          // Load preferences from settings file
57 <        LoadPrefs();
57 >        LoadPrefs(vmdir);
58  
59          // Override prefs with command line options
60          for (int i=1; i<argc; i++) {
61  
62                  // Options are of the form '--keyword'
63                  const char *option = argv[i];
64 <                if (strlen(option) < 3 || option[0] != '-' || option[1] != '-')
64 >                if (!option || strlen(option) < 3 || option[0] != '-' || option[1] != '-')
65                          continue;
66                  const char *keyword = option + 2;
67  
# Line 121 | Line 121 | void PrefsInit(int &argc, char **&argv)
121                          argc -= k;
122                  }
123          }
124 +
125 + #ifdef SHEEPSHAVER
126 +        // System specific initialization
127 +        prefs_init();
128 + #endif
129   }
130  
131  
# Line 130 | Line 135 | void PrefsInit(int &argc, char **&argv)
135  
136   void PrefsExit(void)
137   {
138 + #ifdef SHEEPSHAVER
139 +        // System specific deinitialization
140 +        prefs_exit();
141 + #endif
142 +
143          // Free prefs list
144          prefs_node *p = the_prefs, *next;
145          while (p) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines