Revert changes with HAVE_XML. The XML read for memory map are not parsed

in any way by SSNES and does not depend on libxml2.

Also keep removal of log where XML map is not found (very likely
anyways).
This commit is contained in:
Themaister 2012-02-16 20:22:58 +01:00
parent 356d565ce6
commit 6d1ab7ebfd
2 changed files with 2 additions and 17 deletions

8
file.c
View File

@ -550,23 +550,17 @@ void save_ram_file(const char *path, int type)
} }
} }
#ifdef HAVE_XML
static char *load_xml_map(const char *path) static char *load_xml_map(const char *path)
{ {
char *xml_buf = NULL; char *xml_buf = NULL;
if (*path) if (*path)
{ {
if (!read_file_string(path, &xml_buf)) if (read_file_string(path, &xml_buf))
SSNES_LOG("Did not find XML memory map in \"%s\"\n", path);
else
SSNES_LOG("Found XML memory map in \"%s\"\n", path); SSNES_LOG("Found XML memory map in \"%s\"\n", path);
} }
return xml_buf; return xml_buf;
} }
#else
#define load_xml_map(xml_name) (NULL)
#endif
static bool load_sgb_rom(void) static bool load_sgb_rom(void)
{ {

11
ssnes.c
View File

@ -419,9 +419,7 @@ static void print_features(void)
_PSUPP(al, "OpenAL", "audio driver"); _PSUPP(al, "OpenAL", "audio driver");
_PSUPP(dylib, "External", "External filter and driver support"); _PSUPP(dylib, "External", "External filter and driver support");
_PSUPP(cg, "Cg", "Cg pixel shaders"); _PSUPP(cg, "Cg", "Cg pixel shaders");
#ifdef HAVE_XML
_PSUPP(xml, "XML", "bSNES XML pixel shaders"); _PSUPP(xml, "XML", "bSNES XML pixel shaders");
#endif
_PSUPP(sdl_image, "SDL_image", "SDL_image image loading"); _PSUPP(sdl_image, "SDL_image", "SDL_image image loading");
_PSUPP(fbo, "FBO", "OpenGL render-to-texture (multi-pass shaders)"); _PSUPP(fbo, "FBO", "OpenGL render-to-texture (multi-pass shaders)");
_PSUPP(dynamic, "Dynamic", "Dynamic run-time loading of libsnes library"); _PSUPP(dynamic, "Dynamic", "Dynamic run-time loading of libsnes library");
@ -512,9 +510,7 @@ static void print_help(void)
puts("\t-v/--verbose: Verbose logging."); puts("\t-v/--verbose: Verbose logging.");
puts("\t-U/--ups: Specifies path for UPS patch that will be applied to ROM."); puts("\t-U/--ups: Specifies path for UPS patch that will be applied to ROM.");
puts("\t--bps: Specifies path for BPS patch that will be applied to ROM."); puts("\t--bps: Specifies path for BPS patch that will be applied to ROM.");
#ifdef HAVE_XML
puts("\t-X/--xml: Specifies path to XML memory map."); puts("\t-X/--xml: Specifies path to XML memory map.");
#endif
puts("\t-D/--detach: Detach SSNES from the running console. Not relevant for all platforms.\n"); puts("\t-D/--detach: Detach SSNES from the running console. Not relevant for all platforms.\n");
} }
@ -661,9 +657,7 @@ static void parse_input(int argc, char *argv[])
#endif #endif
{ "ups", 1, NULL, 'U' }, { "ups", 1, NULL, 'U' },
{ "bps", 1, &val, 'B' }, { "bps", 1, &val, 'B' },
#ifdef HAVE_XML
{ "xml", 1, NULL, 'X' }, { "xml", 1, NULL, 'X' },
#endif
{ "detach", 0, NULL, 'D' }, { "detach", 0, NULL, 'D' },
{ "features", 0, &val, 'f' }, { "features", 0, &val, 'f' },
{ NULL, 0, NULL, 0 } { NULL, 0, NULL, 0 }
@ -856,11 +850,10 @@ static void parse_input(int argc, char *argv[])
strlcpy(g_extern.ups_name, optarg, sizeof(g_extern.ups_name)); strlcpy(g_extern.ups_name, optarg, sizeof(g_extern.ups_name));
g_extern.ups_pref = true; g_extern.ups_pref = true;
break; break;
#ifdef HAVE_XML
case 'X': case 'X':
strlcpy(g_extern.xml_name, optarg, sizeof(g_extern.xml_name)); strlcpy(g_extern.xml_name, optarg, sizeof(g_extern.xml_name));
break; break;
#endif
case 'D': case 'D':
#if defined(_WIN32) && !defined(_XBOX) #if defined(_WIN32) && !defined(_XBOX)
@ -1492,10 +1485,8 @@ static void fill_pathnames(void)
if (!(*g_extern.bps_name)) if (!(*g_extern.bps_name))
fill_pathname_noext(g_extern.bps_name, g_extern.basename, ".bps", sizeof(g_extern.bps_name)); fill_pathname_noext(g_extern.bps_name, g_extern.basename, ".bps", sizeof(g_extern.bps_name));
#ifdef HAVE_XML
if (!(*g_extern.xml_name)) if (!(*g_extern.xml_name))
fill_pathname_noext(g_extern.xml_name, g_extern.basename, ".xml", sizeof(g_extern.xml_name)); fill_pathname_noext(g_extern.xml_name, g_extern.basename, ".xml", sizeof(g_extern.xml_name));
#endif
if (!(*g_settings.screenshot_directory)) if (!(*g_settings.screenshot_directory))
{ {