172 |
|
return i; |
173 |
|
} |
174 |
|
|
175 |
< |
#define QuitEmulator() QuitEmuNoExit() ; return NO; |
175 |
> |
#define QuitEmulator() { QuitEmuNoExit() ; return NO; } |
176 |
|
|
177 |
|
bool InitEmulator (void) |
178 |
|
{ |
269 |
|
|
270 |
|
// Get rom file path from preferences |
271 |
|
const char *rom_path = PrefsFindString("rom"); |
272 |
+ |
if ( ! rom_path ) |
273 |
+ |
WarningAlert("No rom pathname set. Trying ./ROM"); |
274 |
|
|
275 |
|
// Load Mac ROM |
276 |
|
int rom_fd = open(rom_path ? rom_path : ROM_FILE_NAME, O_RDONLY); |
320 |
|
|
321 |
|
void QuitEmuNoExit() |
322 |
|
{ |
321 |
– |
extern NSApplication *NSApp; |
322 |
– |
|
323 |
– |
|
323 |
|
D(bug("QuitEmulator\n")); |
324 |
|
|
325 |
|
// Exit 680x0 emulation |
360 |
|
|
361 |
|
// Exit preferences |
362 |
|
PrefsExit(); |
364 |
– |
|
365 |
– |
// Stop run loop |
366 |
– |
[NSApp terminate: nil]; |
363 |
|
} |
364 |
|
|
365 |
|
void QuitEmulator(void) |
366 |
|
{ |
367 |
+ |
extern NSApplication *NSApp; |
368 |
+ |
|
369 |
+ |
|
370 |
|
QuitEmuNoExit(); |
371 |
+ |
|
372 |
+ |
// Stop run loop? |
373 |
+ |
[NSApp terminate: nil]; |
374 |
+ |
|
375 |
|
exit(0); |
376 |
|
} |
377 |
|
|