# HG changeset patch # User Chris Cannam # Date 1478012984 0 # Node ID 7eff522b23aed72aa080538881e031bf9b5348e7 # Parent 78baaad4a001aa74a9e01473defbc6c31092e3fc More useful reporting output diff -r 78baaad4a001 -r 7eff522b23ae src/helper.cpp --- a/src/helper.cpp Fri Oct 28 14:32:30 2016 +0100 +++ b/src/helper.cpp Tue Nov 01 15:09:44 2016 +0000 @@ -61,7 +61,9 @@ #include #include #ifdef UNICODE +static std::string lastLibraryName = ""; static HMODULE LoadLibraryUTF8(std::string name) { + lastLibraryName = name; int n = name.size(); int wn = MultiByteToWideChar(CP_UTF8, 0, name.c_str(), n, 0, 0); wchar_t *wname = new wchar_t[wn+1]; @@ -101,6 +103,10 @@ s.erase(i, 1); } } + std::size_t pos = s.find("%1"); + if (pos != std::string::npos && lastLibraryName != "") { + s.replace(pos, 2, lastLibraryName); + } return s; } #define DLOPEN(a,b) LoadLibraryUTF8(a)