mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-12-24 10:32:32 +00:00
Allow linking after prefs API changes from 3 months ago.
This commit is contained in:
parent
02313b55c2
commit
4ab9ed8863
@ -662,7 +662,7 @@ shouldProceedAfterError: (NSDictionary *) errorDict
|
||||
|
||||
PrefsExit(); // Purge all the old pref values
|
||||
|
||||
PrefsInit(argc, argv);
|
||||
PrefsInit(NULL, argc, argv);
|
||||
AddPrefsDefaults();
|
||||
AddPlatformPrefsDefaults(); // and only create basic ones
|
||||
|
||||
|
@ -52,8 +52,20 @@ static string prefs_path;
|
||||
* Load preferences from settings file
|
||||
*/
|
||||
|
||||
void LoadPrefs(void)
|
||||
void LoadPrefs(const char *vmdir)
|
||||
{
|
||||
if (vmdir) {
|
||||
prefs_path = string(vmdir) + '/' + string("prefs");
|
||||
FILE *prefs = fopen(prefs_path.c_str(), "r");
|
||||
if (!prefs) {
|
||||
printf("No file at %s found.\n", prefs_path.c_str());
|
||||
exit(1);
|
||||
}
|
||||
LoadPrefsFromStream(prefs);
|
||||
fclose(prefs);
|
||||
return;
|
||||
}
|
||||
|
||||
// Construct prefs path
|
||||
if (UserPrefsPath.empty()) {
|
||||
char *home = getenv("HOME");
|
||||
|
Loading…
Reference in New Issue
Block a user