Changed: Use wide version of Win32 API

--HG--
branch : develop
This commit is contained in:
kervala 2016-11-20 15:09:59 +01:00
parent 38736df5c7
commit 935a3dc5cc

View file

@ -225,10 +225,10 @@ ISoundDriver *ISoundDriver::createDriver(IStringMapperProvider *stringMapper, TD
* MTR: Is there a way with NLMISC to replace SearchFile() ? Until then, no info for Linux.
*/
#ifdef NL_OS_WINDOWS
char buffer[1024], *ptr;
uint len = SearchPath (NULL, dllName.c_str(), NULL, 1023, buffer, &ptr);
wchar_t buffer[1024], *ptr;
uint len = SearchPathW (NULL, utf8ToWide(dllName), NULL, 1023, buffer, &ptr);
if( len )
nlinfo ("Using the library '%s' that is in the directory: '%s'", dllName.c_str(), buffer);
nlinfo ("Using the library '%s' that is in the directory: '%s'", dllName.c_str(), wideToUtf8(buffer).c_str());
#endif
createSoundDriver = (ISDRV_CREATE_PROC) driverLib.getSymbolAddress(IDRV_CREATE_PROC_NAME);