--- hatari/src/gui-sdl/dlgMemory.c 2019/04/01 07:11:38 1.1.1.1 +++ hatari/src/gui-sdl/dlgMemory.c 2019/04/01 07:12:22 1.1.1.2 @@ -4,12 +4,11 @@ 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. */ -char DlgMemory_rcsid[] = "Hatari $Id: dlgMemory.c,v 1.1.1.1 2019/04/01 07:11:38 root Exp $"; +char DlgMemory_rcsid[] = "Hatari $Id: dlgMemory.c,v 1.1.1.2 2019/04/01 07:12:22 root Exp $"; #include "main.h" #include "dialog.h" #include "sdlgui.h" -#include "memAlloc.h" #include "memorySnapShot.h" #include "file.h" #include "screen.h" @@ -63,7 +62,12 @@ void Dialog_MemDlg(void) char *tmpname; /* Allocate memory for tmpname: */ - tmpname = Memory_Alloc(FILENAME_MAX); + tmpname = malloc(FILENAME_MAX); + if (!tmpname) + { + perror("Dialog_MemDlg"); + return; + } SDLGui_CenterDlg(memorydlg); @@ -84,7 +88,7 @@ void Dialog_MemDlg(void) do { - but = SDLGui_DoDialog(memorydlg); + but = SDLGui_DoDialog(memorydlg, NULL); switch(but) { @@ -114,7 +118,7 @@ void Dialog_MemDlg(void) break; } } - while( but!=DLGMEM_EXIT && !bQuitProgram ); + while (but != DLGMEM_EXIT && but != SDLGUI_QUIT && !bQuitProgram ); if( memorydlg[DLGMEM_512KB].state & SG_SELECTED ) DialogParams.Memory.nMemorySize = MEMORY_SIZE_512Kb; @@ -125,5 +129,5 @@ void Dialog_MemDlg(void) else DialogParams.Memory.nMemorySize = MEMORY_SIZE_4Mb; - Memory_Free(tmpname); + free(tmpname); }