--- Frodo4/Src/main_x.h 2004/01/13 19:52:49 1.5 +++ Frodo4/Src/main_x.h 2007/01/28 16:05:40 1.10 @@ -1,7 +1,7 @@ /* * main_x.h - Main program, Unix specific stuff * - * Frodo (C) 1994-1997,2002-2004 Christian Bauer + * Frodo (C) 1994-1997,2002-2005 Christian Bauer * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -24,6 +24,11 @@ #include #endif +// Qtopia Windowing System +#ifdef QTOPIA +extern "C" int main(int argc, char *argv[]); +#include +#endif extern int init_graphics(void); @@ -47,7 +52,13 @@ int main(int argc, char **argv) gettimeofday(&tv, NULL); srand(tv.tv_usec); - printf("%s by Christian Bauer\n", VERSION_STRING); +#ifndef HAVE_GLADE + printf( + "%s Copyright (C) 1994-1997,2002-2005 Christian Bauer\n" + "This is free software with ABSOLUTELY NO WARRANTY.\n" + , VERSION_STRING + ); +#endif if (!init_graphics()) return 1; fflush(stdout); @@ -102,14 +113,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 +132,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); +}