1 |
|
/* |
2 |
|
* prefs.cpp - Preferences handling |
3 |
|
* |
4 |
< |
* Basilisk II (C) 1997-2005 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 |
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 |
|
|