diff --git a/conf/config_file.c b/conf/config_file.c index 8c1cea1052..e34fa926bd 100644 --- a/conf/config_file.c +++ b/conf/config_file.c @@ -22,11 +22,11 @@ #include #include #include -#include "strl.h" +#include "../strl.h" -#ifndef _WIN32 +#if !defined(_WIN32) && !defined(__CELLOS_LV2__) #include // MAXPATHLEN -#else +#elif defined(_WIN32) #define WIN32_LEAN_AND_MEAN #include #endif diff --git a/file.c b/file.c index a1733b6477..4f3345326f 100644 --- a/file.c +++ b/file.c @@ -756,7 +756,7 @@ static bool load_normal_rom(void) if (!g_extern.rom_file) { SSNES_ERR("Implementation requires a full path to be set, cannot load ROM from stdin. Aborting ...\n"); - exit(1); + return false; } fclose(g_extern.rom_file); @@ -769,12 +769,11 @@ static bool load_normal_rom(void) { SSNES_ERR("ROM file is not valid!\n"); free(rom_buf); + free(xml_buf); return false; } - if (xml_buf) - free(xml_buf); - + free(xml_buf); free(rom_buf); return true; } diff --git a/general.h b/general.h index c1342dc688..e2857a3726 100644 --- a/general.h +++ b/general.h @@ -46,11 +46,9 @@ #include "audio/hermite.h" -#if !defined(_WIN32) -#if !defined(__CELLOS_LV2__) +#if !defined(_WIN32) && !defined(__CELLOS_LV2__) #include // MAXPATHLEN -#endif -#else +#elif defined(_WIN32) #define WIN32_LEAN_AND_MEAN #include #endif