--- hatari/src/gui-sdl/dlgKeyboard.c 2019/04/01 07:11:38 1.1.1.1 +++ hatari/src/gui-sdl/dlgKeyboard.c 2019/04/01 07:13:15 1.1.1.3 @@ -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 DlgKeyboard_rcsid[] = "Hatari $Id: dlgKeyboard.c,v 1.1.1.1 2019/04/01 07:11:38 root Exp $"; +const char DlgKeyboard_rcsid[] = "Hatari $Id: dlgKeyboard.c,v 1.1.1.3 2019/04/01 07:13:15 root Exp $"; #include #include "main.h" -#include "memAlloc.h" #include "configuration.h" #include "dialog.h" #include "sdlgui.h" @@ -52,7 +51,12 @@ void Dialog_KeyboardDlg(void) char dlgmapfile[40]; char *tmpname; - tmpname = Memory_Alloc(FILENAME_MAX); + tmpname = malloc(FILENAME_MAX); + if (!tmpname) + { + perror("Dialog_KeyboardDlg"); + return; + } SDLGui_CenterDlg(keyboarddlg); @@ -69,7 +73,7 @@ void Dialog_KeyboardDlg(void) /* Show the dialog: */ do { - but = SDLGui_DoDialog(keyboarddlg); + but = SDLGui_DoDialog(keyboarddlg, NULL); if(but == DLGKEY_MAPBROWSE) { @@ -90,7 +94,7 @@ void Dialog_KeyboardDlg(void) } } - while(but != DLGKEY_EXIT && !bQuitProgram); + while (but != DLGKEY_EXIT && but != SDLGUI_QUIT && !bQuitProgram); /* Read values from dialog: */ if(keyboarddlg[DLGKEY_SYMBOLIC].state & SG_SELECTED) @@ -100,5 +104,5 @@ void Dialog_KeyboardDlg(void) else DialogParams.Keyboard.nKeymapType = KEYMAP_LOADED; - Memory_Free(tmpname); + free(tmpname); }