Log error code on dylib failure in Windows.

This commit is contained in:
Themaister 2012-03-05 21:39:27 +01:00
parent 3c2591f71f
commit 37c29144d8

View File

@ -240,7 +240,10 @@ void uninit_libsnes_sym(void)
dylib_t dylib_load(const char *path)
{
#ifdef _WIN32
return LoadLibrary(path);
dylib_t lib = LoadLibrary(path);
if (!lib)
SSNES_ERR("Failed to load library, error code: 0x%x\n", (unsigned)GetLastError());
return lib;
#else
return dlopen(path, RTLD_LAZY);
#endif