--- hatari/src/uae-cpu/memory.c 2019/04/01 07:13:48 1.1.1.10 +++ hatari/src/uae-cpu/memory.c 2019/04/09 08:48:50 1.1.1.14 @@ -10,20 +10,22 @@ * This file is distributed under the GNU Public License, version 2 or at * your option any later version. Read the file gpl.txt for details. */ -const char Memory_rcsid[] = "Hatari $Id: memory.c,v 1.1.1.10 2019/04/01 07:13:48 root Exp $"; +const char Memory_fileid[] = "Hatari memory.c : " __DATE__ " " __TIME__; #include "config.h" #include "sysdeps.h" #include "hatari-glue.h" #include "maccess.h" #include "memory.h" -#include "../includes/main.h" -#include "../includes/tos.h" -#include "../includes/ide.h" -#include "../includes/ioMem.h" -#include "../includes/reset.h" -#include "../includes/stMemory.h" -#include "../includes/m68000.h" + +#include "main.h" +#include "tos.h" +#include "ide.h" +#include "ioMem.h" +#include "reset.h" +#include "stMemory.h" +#include "m68000.h" + #include "newcpu.h" @@ -85,6 +87,7 @@ __inline__ void byteput (uaecptr addr, u /* Some prototypes: */ +extern void SDL_Quit(void); static int STmem_check (uaecptr addr, uae_u32 size) REGPARAM; static uae_u8 *STmem_xlate (uaecptr addr) REGPARAM; @@ -681,6 +684,7 @@ void memory_init(uae_u32 nNewSTMemSize, ROMmemory = malloc(2*1024*1024); if (!ROMmemory) { fprintf(stderr, "Out of memory (ROM/IO mem)!\n"); + SDL_Quit(); exit(1); } IdeMemory = ROMmemory + 0x100000; @@ -696,6 +700,7 @@ void memory_init(uae_u32 nNewSTMemSize, } if (!STmemory) { write_log ("virtual memory exhausted (STmemory)!\n"); + SDL_Quit(); exit(1); }