--- hatari/src/gui-sdl/dlgDevice.c 2019/04/01 07:11:38 1.1.1.1 +++ hatari/src/gui-sdl/dlgDevice.c 2019/04/01 07:12:23 1.1.1.2 @@ -6,13 +6,12 @@ Device (Printer etc.) setup dialog */ -char DlgDevice_rcsid[] = "Hatari $Id: dlgDevice.c,v 1.1.1.1 2019/04/01 07:11:38 root Exp $"; +char DlgDevice_rcsid[] = "Hatari $Id: dlgDevice.c,v 1.1.1.2 2019/04/01 07:12:23 root Exp $"; #include "main.h" #include "configuration.h" #include "dialog.h" #include "sdlgui.h" -#include "memAlloc.h" #include "file.h" #include "screen.h" @@ -79,7 +78,12 @@ void Dialog_DeviceDlg(void) char *tmpname; /* Allocate memory for tmpname: */ - tmpname = Memory_Alloc(FILENAME_MAX); + tmpname = malloc(FILENAME_MAX); + if (!tmpname) + { + perror("Dialog_DeviceDlg"); + return; + } SDLGui_CenterDlg(devicedlg); @@ -107,7 +111,7 @@ void Dialog_DeviceDlg(void) /* The devices dialog main loop */ do { - but = SDLGui_DoDialog(devicedlg); + but = SDLGui_DoDialog(devicedlg, NULL); switch(but) { @@ -157,12 +161,12 @@ void Dialog_DeviceDlg(void) break; } } - while (but != DEVDLG_EXIT && !bQuitProgram); + while (but != DEVDLG_EXIT && but != SDLGUI_QUIT && !bQuitProgram); /* Read values from dialog */ DialogParams.Printer.bEnablePrinting = (devicedlg[DEVDLG_PRNENABLE].state & SG_SELECTED); DialogParams.RS232.bEnableRS232 = (devicedlg[DEVDLG_RS232ENABLE].state & SG_SELECTED); DialogParams.Midi.bEnableMidi = (devicedlg[DEVDLG_MIDIENABLE].state & SG_SELECTED); - Memory_Free(tmpname); + free(tmpname); }