@@ -448,8 +448,12 @@ static void systemFlushIo() {
448
448
}
449
449
450
450
void systemKill (const char * szMsg ) {
451
- printf ("ERR: SYSKILL: '%s'" , szMsg );
452
- logWrite ("ERR: SYSKILL: '%s'" , szMsg );
451
+ logWrite ("ERR: ACE SYSKILL: '%s'" , szMsg );
452
+ if (DOSBase ) {
453
+ BPTR lOut = Output ();
454
+ Write (lOut , "ERR: ACE SYSKILL: " , sizeof ("ERR: ACE SYSKILL: " ));
455
+ Write (lOut , (char * )szMsg , strlen (szMsg ));
456
+ }
453
457
454
458
if (GfxBase ) {
455
459
CloseLibrary ((struct Library * ) GfxBase );
@@ -466,26 +470,28 @@ void systemCreate(void) {
466
470
SysBase = * ((struct ExecBase * * )4UL );
467
471
#endif
468
472
469
- GfxBase = (struct GfxBase * )OpenLibrary ((CONST_STRPTR )"graphics.library" , 0L );
470
- if (!GfxBase ) {
471
- systemKill ("Can't open Gfx Library!\n" );
472
- return ;
473
- }
474
-
475
473
DOSBase = (struct DosLibrary * )OpenLibrary ((CONST_STRPTR )"dos.library" , 0 );
476
474
if (!DOSBase ) {
477
475
systemKill ("Can't open DOS Library!\n" );
478
476
return ;
479
477
}
480
478
479
+ GfxBase = (struct GfxBase * )OpenLibrary ((CONST_STRPTR )"graphics.library" , 0L );
480
+ if (!GfxBase ) {
481
+ systemKill ("Can't open Gfx Library!\n" );
482
+ return ;
483
+ }
484
+
481
485
// Determine original stack size
482
486
s_pProcess = (struct Process * )FindTask (NULL );
483
487
char * pStackLower = (char * )s_pProcess -> pr_Task .tc_SPLower ;
488
+ #if defined(ACE_DEBUG )
484
489
ULONG ulStackSize = (char * )s_pProcess -> pr_Task .tc_SPUpper - pStackLower ;
485
490
if (s_pProcess -> pr_CLI ) {
486
491
ulStackSize = * (ULONG * )s_pProcess -> pr_ReturnAddr ;
487
492
}
488
493
logWrite ("Stack size: %lu\n" , ulStackSize );
494
+ #endif
489
495
* pStackLower = SYSTEM_STACK_CANARY ;
490
496
491
497
// Reserve all audio channels - apparantly this allows for int flag polling
0 commit comments