ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/MacOSX/main_macosx.mm
(Generate patch)

Comparing BasiliskII/src/MacOSX/main_macosx.mm (file contents):
Revision 1.2 by nigel, 2002-05-25T23:58:51Z vs.
Revision 1.7 by nigel, 2003-03-26T00:26:38Z

# Line 96 | Line 96 | uint8 *ScratchMem = NULL;                      // Scratch m
96   static timer_t timer;                           // 60Hz timer
97   #endif
98  
99 < //#ifdef ENABLE_MON
99 > #ifdef ENABLE_MON
100   static struct sigaction sigint_sa;      // sigaction for SIGINT handler
101   static void sigint_handler(...);
102 < //#endif
102 > #endif
103  
104   #if REAL_ADDRESSING
105   static bool lm_area_mapped = false;     // Flag: Low Memory area mmap()ped
# Line 172 | Line 172 | int main(int argc, char **argv)
172          return i;
173   }
174  
175 < #define QuitEmulator()  QuitEmuNoExit() ; return NO;
175 > #define QuitEmulator()  { QuitEmuNoExit() ; return NO; }
176  
177   bool InitEmulator (void)
178   {
# Line 223 | Line 223 | bool InitEmulator (void)
223                  ErrorAlert(str);
224                  QuitEmulator();
225          }
226 + #else
227 +        *str = 0;               // Eliminate unused variable warning
228   #endif
229  
230          // Create areas for Mac RAM and ROM
# Line 267 | Line 269 | bool InitEmulator (void)
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);
# Line 316 | Line 320 | bool InitEmulator (void)
320  
321   void QuitEmuNoExit()
322   {
319        extern  NSApplication *NSApp;
320
321
323          D(bug("QuitEmulator\n"));
324  
325          // Exit 680x0 emulation
# Line 359 | Line 360 | void QuitEmuNoExit()
360  
361          // Exit preferences
362          PrefsExit();
362
363        // Stop run loop
364        [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  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines