--- hatari/src/gui-sdl/dlgFileSelect.c 2019/04/09 08:55:54 1.1.1.13 +++ hatari/src/gui-sdl/dlgFileSelect.c 2019/04/09 08:59:37 1.1.1.15 @@ -18,6 +18,7 @@ const char DlgFileSelect_fileid[] = "Hat #include "file.h" #include "paths.h" #include "zip.h" +#include "log.h" #define SGFS_NUMENTRIES 16 /* How many entries are displayed at once */ @@ -91,7 +92,7 @@ static SGOBJ fsdlg[] = { SGCHECKBOX, SG_EXIT, 0, 2,23, 19,1, "_Show hidden files" }, { SGBUTTON, SG_DEFAULT, 0, 32,23, 8,1, "OK" }, { SGBUTTON, SG_CANCEL, 0, 50,23, 8,1, "Cancel" }, - { -1, 0, 0, 0,0, 0,0, NULL } + { SGSTOP, 0, 0, 0,0, 0,0, NULL } }; @@ -659,7 +660,7 @@ char* SDLGui_FileSelect(const char *titl files = ZIP_GetFilesDir(zipfiles, zipdir, &entries); if(!files) { - fprintf(stderr, "SDLGui_FileSelect: ZIP_GetFilesDir error!\n"); + Log_Printf(LOG_WARN, "SDLGui_FileSelect: ZIP_GetFilesDir() error!\n"); goto clean_exit; } } @@ -679,7 +680,7 @@ char* SDLGui_FileSelect(const char *titl if (entries < 0) { - fprintf(stderr, "SDLGui_FileSelect: Path not found.\n"); + Log_Printf(LOG_WARN, "SDLGui_FileSelect: Path not found.\n"); goto clean_exit; } @@ -744,7 +745,7 @@ char* SDLGui_FileSelect(const char *titl if (!strcat_maxlen(tempstr, FILENAME_MAX, zipdir, files[retbut-SGFSDLG_ENTRYFIRST+ypos]->d_name)) { - fprintf(stderr, "SDLGui_FileSelect: Path name too long!\n"); + Log_Printf(LOG_WARN, "SDLGui_FileSelect: Path name too long!\n"); free(tempstr); goto clean_exit; } @@ -799,7 +800,7 @@ char* SDLGui_FileSelect(const char *titl if (!strcat_maxlen(tempstr, FILENAME_MAX, path, files[retbut-SGFSDLG_ENTRYFIRST+ypos]->d_name)) { - fprintf(stderr, "SDLGui_FileSelect: Path name too long!\n"); + Log_Printf(LOG_WARN, "SDLGui_FileSelect: Path name too long!\n"); free(tempstr); goto clean_exit; }