--- Frodo4/Src/main_x.h 2004/01/13 19:52:49 1.5 +++ Frodo4/Src/main_x.h 2004/01/23 15:07:46 1.7 @@ -24,6 +24,10 @@ #include #endif +#ifdef QTOPIA +extern "C" int main(int argc, char *argv[]); +#include +#endif extern int init_graphics(void); @@ -102,14 +106,16 @@ void Frodo::ReadyToRun(void) ThePrefs.Load(prefs_path); // Show preferences editor - if (ThePrefs.ShowEditor(true, prefs_path)) { +#ifdef HAVE_GLADE + if (!ThePrefs.ShowEditor(true, prefs_path)) + return; +#endif - // Create and start C64 - TheC64 = new C64; - load_rom_files(); - TheC64->Run(); - delete TheC64; - } + // Create and start C64 + TheC64 = new C64; + load_rom_files(); + TheC64->Run(); + delete TheC64; } @@ -119,3 +125,14 @@ Prefs *Frodo::reload_prefs(void) newprefs.Load(prefs_path); return &newprefs; } + + +/* + * Determine whether path name refers to a directory + */ + +bool IsDirectory(const char *path) +{ + struct stat st; + return stat(path, &st) == 0 && S_ISDIR(st.st_mode); +}