--- Frodo4/Src/main_Be.h 2003/07/01 17:33:50 1.1 +++ Frodo4/Src/main_Be.h 2005/06/27 19:55:48 1.8 @@ -1,7 +1,7 @@ /* * main_Be.h - Main program, BeOS specific stuff * - * Frodo (C) 1994-1997,2002 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 @@ -158,10 +158,7 @@ void Frodo::MessageReceived(BMessage *ms TheC64 = new C64; // Load ROMs - if (!load_rom_files()) { - PostMessage(B_QUIT_REQUESTED); - return; - } + load_rom_files(); // Run the 6510 TheC64->Run(); @@ -178,9 +175,9 @@ void Frodo::MessageReceived(BMessage *ms } break; - case MSG_PREFS_DONE: // Preferences editor closed + case MSG_PREFS_DONE: { // Preferences editor closed Prefs *prefs; - msg->FindPointer("prefs", &prefs); + msg->FindPointer("prefs", (void **)&prefs); if (!msg->FindBool("canceled")) { TheC64->NewPrefs(prefs); ThePrefs = *prefs; @@ -191,6 +188,7 @@ void Frodo::MessageReceived(BMessage *ms TheC64->TheDisplay->Resume(); TheC64->Resume(); break; + } case MSG_RESET: // Reset C64 if (TheC64 != NULL) @@ -359,9 +357,9 @@ public: MovePenTo(204, 40); DrawString("by Christian Bauer"); MovePenTo(204, 52); - DrawString(""); + DrawString(""); MovePenTo(204, 75); - DrawString(B_UTF8_COPYRIGHT " Copyright 1994-1997"); + DrawString(B_UTF8_COPYRIGHT " Copyright 1994-1997,2002-2005"); MovePenTo(204, 87); DrawString("Freely distributable."); } @@ -390,3 +388,14 @@ void Frodo::AboutRequested(void) { new AboutWindow(); } + + +/* + * Determine whether path name refers to a directory + */ + +bool IsDirectory(const char *path) +{ + struct stat st; + return stat(path.c_str(), &st) == 0 && S_ISDIR(st.st_mode); +}