mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-11-26 10:49:21 +00:00
BeOS: support for vmdir preferences.
This commit is contained in:
parent
c97be8dbb2
commit
c226da6172
@ -118,6 +118,8 @@ private:
|
||||
class file_open_error {};
|
||||
class file_read_error {};
|
||||
class rom_size_error {};
|
||||
|
||||
char* vmdir;
|
||||
};
|
||||
|
||||
static BasiliskII *the_app;
|
||||
@ -178,7 +180,7 @@ void BasiliskII::ReadyToRun(void)
|
||||
// Read preferences
|
||||
int argc = 0;
|
||||
char **argv = NULL;
|
||||
PrefsInit(argc, argv);
|
||||
PrefsInit(vmdir, argc, argv);
|
||||
|
||||
// Init system routines
|
||||
SysInit();
|
||||
|
@ -44,8 +44,23 @@ static BPath prefs_path;
|
||||
* Load preferences from settings file
|
||||
*/
|
||||
|
||||
void LoadPrefs(void)
|
||||
void LoadPrefs(const char* vmdir)
|
||||
{
|
||||
#if 0
|
||||
if (vmdir) {
|
||||
prefs_path.SetTo(vmdir);
|
||||
prefs_path.Append("prefs");
|
||||
FILE *prefs = fopen(prefs_path.Path(), "r");
|
||||
if (!prefs) {
|
||||
printf("No file at %s found.\n", prefs_path.Path());
|
||||
exit(1);
|
||||
}
|
||||
LoadPrefsFromStream(prefs);
|
||||
fclose(prefs);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Construct prefs path
|
||||
find_directory(B_USER_SETTINGS_DIRECTORY, &prefs_path, true);
|
||||
prefs_path.Append(PREFS_FILE_NAME);
|
||||
|
Loading…
Reference in New Issue
Block a user