From 6adb14a7027c8d54827093c83fc80694d71fb6a7 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Wed, 20 Jun 2018 19:21:48 +0200 Subject: Fix missing finalization of instruments on load. Fix relative instrument filenames according to the drumkit file. Make drumkit creator create version 2.0 drumkits. Reduce missing refs file to a warning. --- src/dgxmlparser.cc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/dgxmlparser.cc') diff --git a/src/dgxmlparser.cc b/src/dgxmlparser.cc index 3fdedc2..8fdcec4 100644 --- a/src/dgxmlparser.cc +++ b/src/dgxmlparser.cc @@ -105,9 +105,10 @@ bool parseDrumkitFile(const std::string& filename, DrumkitDOM& dom) pugi::xml_document doc; pugi::xml_parse_result result = doc.load_file(filename.c_str()); res &= !result.status; - - if(!res) { - printf("PugiXml error %d\n", (int) result.offset); + if(!res) + { + ERR(dgxmlparser, "XML parse error: '%s' %d", filename.data(), + (int) result.offset); return false; } @@ -156,6 +157,10 @@ bool parseInstrumentFile(const std::string& filename, InstrumentDOM& dom) pugi::xml_document doc; pugi::xml_parse_result result = doc.load_file(filename.data()); res &= !result.status; + if(!res) + { + ERR(dgxmlparser, "XML parse error: '%s'", filename.data()); + } //TODO: handle version pugi::xml_node instrument = doc.child("instrument"); -- cgit v1.2.3