From 8a792a7fbd3e33315c9020fae0e2859b846d2eb4 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Wed, 14 Oct 2015 20:05:52 +0300 Subject: [PATCH] Restore WinUAE plugin directory handling. --- dlopen.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/dlopen.cpp b/dlopen.cpp index 164cdf42..ed04fc3e 100644 --- a/dlopen.cpp +++ b/dlopen.cpp @@ -70,6 +70,11 @@ UAE_DLHANDLE uae_dlopen_plugin(const TCHAR *name) return NULL; } UAE_DLHANDLE handle = uae_dlopen(path); +#elif defined(WINUAE) + TCHAR path[MAX_DPATH]; + _tcscpy(path, name); + _tcscat(path, LT_MODULE_EXT); + UAE_DLHANDLE handle = WIN32_LoadLibrary(path); #else TCHAR path[MAX_DPATH]; _tcscpy(path, name); @@ -88,8 +93,10 @@ UAE_DLHANDLE uae_dlopen_plugin(const TCHAR *name) void uae_dlopen_patch_common(UAE_DLHANDLE handle) { - write_log(_T("DLOPEN: Patching common functions\n")); void *ptr; ptr = uae_dlsym(handle, "uae_log"); - if (ptr) *((uae_log_function *) ptr) = &uae_log; + if (ptr) { + write_log(_T("DLOPEN: Patching common functions\n")); + *((uae_log_function *)ptr) = &uae_log; + } } -- 2.47.3