From e2dcd7475aefb749aa4b10c2d4c3e9f21599017b Mon Sep 17 00:00:00 2001 From: "simon.kagstrom" Date: Mon, 8 Feb 2010 17:56:32 +0000 Subject: [PATCH] Don't bail out if the prefs isn't found --- Src/Prefs.cpp | 6 ++++++ Src/main.cpp | 10 ++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Src/Prefs.cpp b/Src/Prefs.cpp index 8b69c3b..70b7f53 100644 --- a/Src/Prefs.cpp +++ b/Src/Prefs.cpp @@ -51,8 +51,14 @@ Prefs::Prefs() ScalingNumerator = 2; ScalingDenominator = 2; +#if defined(GEKKO) + strcpy(BasePath, "/frodo/"); + strcpy(PrefsPath, "/frodo/"); +#else strcpy(BasePath, ""); strcpy(PrefsPath, ""); +#endif + strcpy(DrivePath[0], "64prgs"); strcpy(DrivePath[1], ""); strcpy(DrivePath[2], ""); diff --git a/Src/main.cpp b/Src/main.cpp index 87332da..f09c005 100644 --- a/Src/main.cpp +++ b/Src/main.cpp @@ -221,12 +221,14 @@ void Frodo::LoadFrodorc() } free((void*)p); } - panic_if(!total_name, - "Cannot find frodorc or frodorc.default in any tried directory"); // Load preferences - ThePrefs.Load(total_name); - strncpy(ThePrefs.PrefsPath, prefs_path, sizeof(ThePrefs.PrefsPath)); + if (total_name) + { + ThePrefs.Load(total_name); + strncpy(ThePrefs.PrefsPath, prefs_path, sizeof(ThePrefs.PrefsPath)); + } else + warning("Cannot find frodorc or frodorc.default in any tried directory"); free((void*)total_name); }