1 |
|
/* |
2 |
|
* main_Be.h - Main program, BeOS specific stuff |
3 |
|
* |
4 |
< |
* Frodo (C) 1994-1997,2002-2003 Christian Bauer |
4 |
> |
* Frodo (C) 1994-1997,2002-2005 Christian Bauer |
5 |
|
* |
6 |
|
* This program is free software; you can redistribute it and/or modify |
7 |
|
* it under the terms of the GNU General Public License as published by |
158 |
|
TheC64 = new C64; |
159 |
|
|
160 |
|
// Load ROMs |
161 |
< |
if (!load_rom_files()) { |
162 |
< |
PostMessage(B_QUIT_REQUESTED); |
163 |
< |
return; |
164 |
< |
} |
161 |
> |
load_rom_files(); |
162 |
|
|
163 |
|
// Run the 6510 |
164 |
|
TheC64->Run(); |
175 |
|
} |
176 |
|
break; |
177 |
|
|
178 |
< |
case MSG_PREFS_DONE: // Preferences editor closed |
178 |
> |
case MSG_PREFS_DONE: { // Preferences editor closed |
179 |
|
Prefs *prefs; |
180 |
< |
msg->FindPointer("prefs", &prefs); |
180 |
> |
msg->FindPointer("prefs", (void **)&prefs); |
181 |
|
if (!msg->FindBool("canceled")) { |
182 |
|
TheC64->NewPrefs(prefs); |
183 |
|
ThePrefs = *prefs; |
188 |
|
TheC64->TheDisplay->Resume(); |
189 |
|
TheC64->Resume(); |
190 |
|
break; |
191 |
+ |
} |
192 |
|
|
193 |
|
case MSG_RESET: // Reset C64 |
194 |
|
if (TheC64 != NULL) |
357 |
|
MovePenTo(204, 40); |
358 |
|
DrawString("by Christian Bauer"); |
359 |
|
MovePenTo(204, 52); |
360 |
< |
DrawString("<cbauer@iphcip1.physik.uni-mainz.de>"); |
360 |
> |
DrawString("<Christian.Bauer@uni-mainz.de>"); |
361 |
|
MovePenTo(204, 75); |
362 |
< |
DrawString(B_UTF8_COPYRIGHT " Copyright 1994-1997"); |
362 |
> |
DrawString(B_UTF8_COPYRIGHT " Copyright 1994-1997,2002-2005"); |
363 |
|
MovePenTo(204, 87); |
364 |
|
DrawString("Freely distributable."); |
365 |
|
} |
388 |
|
{ |
389 |
|
new AboutWindow(); |
390 |
|
} |
391 |
+ |
|
392 |
+ |
|
393 |
+ |
/* |
394 |
+ |
* Determine whether path name refers to a directory |
395 |
+ |
*/ |
396 |
+ |
|
397 |
+ |
bool IsDirectory(const char *path) |
398 |
+ |
{ |
399 |
+ |
struct stat st; |
400 |
+ |
return stat(path.c_str(), &st) == 0 && S_ISDIR(st.st_mode); |
401 |
+ |
} |