mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-27 15:45:56 -05:00
Suppress errors when dep libs aren't present (wmvcore.dll for ssc-wma, for example). Should close ticket #177
This commit is contained in:
parent
659751a485
commit
b3b3f2f39c
@ -702,11 +702,14 @@ void _os_unlock(void) {
|
|||||||
*/
|
*/
|
||||||
void *os_loadlib(char **pe, char *path) {
|
void *os_loadlib(char **pe, char *path) {
|
||||||
void *retval;
|
void *retval;
|
||||||
|
UINT old_mode;
|
||||||
|
|
||||||
|
old_mode = SetErrorMode(SEM_NOOPENFILEERRORBOX);
|
||||||
retval = (void*)LoadLibrary(path);
|
retval = (void*)LoadLibrary(path);
|
||||||
if(!retval) {
|
if(!retval) {
|
||||||
if(pe) *pe = strdup(os_strerror(0));
|
if(pe) *pe = strdup(os_strerror(0));
|
||||||
}
|
}
|
||||||
|
SetErrorMode(old_mode);
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user