mirror of
https://github.com/kanjitalk755/macemu.git
synced 2025-01-03 16:33:47 +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_open_error {};
|
||||||
class file_read_error {};
|
class file_read_error {};
|
||||||
class rom_size_error {};
|
class rom_size_error {};
|
||||||
|
|
||||||
|
char* vmdir;
|
||||||
};
|
};
|
||||||
|
|
||||||
static BasiliskII *the_app;
|
static BasiliskII *the_app;
|
||||||
@ -178,7 +180,7 @@ void BasiliskII::ReadyToRun(void)
|
|||||||
// Read preferences
|
// Read preferences
|
||||||
int argc = 0;
|
int argc = 0;
|
||||||
char **argv = NULL;
|
char **argv = NULL;
|
||||||
PrefsInit(argc, argv);
|
PrefsInit(vmdir, argc, argv);
|
||||||
|
|
||||||
// Init system routines
|
// Init system routines
|
||||||
SysInit();
|
SysInit();
|
||||||
|
@ -44,8 +44,23 @@ static BPath prefs_path;
|
|||||||
* Load preferences from settings file
|
* 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
|
// Construct prefs path
|
||||||
find_directory(B_USER_SETTINGS_DIRECTORY, &prefs_path, true);
|
find_directory(B_USER_SETTINGS_DIRECTORY, &prefs_path, true);
|
||||||
prefs_path.Append(PREFS_FILE_NAME);
|
prefs_path.Append(PREFS_FILE_NAME);
|
||||||
|
Loading…
Reference in New Issue
Block a user