diff --git a/plugins/GSdx/GSDeviceDX.cpp b/plugins/GSdx/GSDeviceDX.cpp index 5aa5761ce1..2844f37e40 100644 --- a/plugins/GSdx/GSDeviceDX.cpp +++ b/plugins/GSdx/GSDeviceDX.cpp @@ -57,7 +57,9 @@ bool GSDeviceDX::LoadD3DCompiler() else { if (!IsWindows8Point1OrGreater()) - s_d3d_compiler_dll = LoadLibraryEx("D3DCompiler_43.dll", nullptr, LOAD_LIBRARY_SEARCH_SYSTEM32); + // Use LoadLibrary instead of LoadLibraryEx, some Windows 7 systems + // have issues with it. + s_d3d_compiler_dll = LoadLibrary("D3DCompiler_43.dll"); if (s_d3d_compiler_dll == nullptr) return false; diff --git a/plugins/LilyPad/XInputEnum.cpp b/plugins/LilyPad/XInputEnum.cpp index 3f72441f0a..9a5a5d57df 100644 --- a/plugins/LilyPad/XInputEnum.cpp +++ b/plugins/LilyPad/XInputEnum.cpp @@ -255,13 +255,13 @@ void EnumXInputDevices() { // don't repeatedly try to load it. if (pXInputEnable) return; - const DWORD flags = LOAD_LIBRARY_SEARCH_APPLICATION_DIR | LOAD_LIBRARY_SEARCH_SYSTEM32; - // Prefer XInput 1.3 since SCP only has an XInput 1.3 wrapper right now. + // Also use LoadLibrary and not LoadLibraryEx for XInput 1.3, since some + // Windows 7 systems have issues with it. // FIXME: Missing FreeLibrary call. - HMODULE hMod = LoadLibraryEx(L"xinput1_3.dll", nullptr, flags); + HMODULE hMod = LoadLibrary(L"xinput1_3.dll"); if (hMod == nullptr && IsWindows8OrGreater()) { - hMod = LoadLibraryEx(L"XInput1_4.dll", nullptr, flags); + hMod = LoadLibraryEx(L"XInput1_4.dll", nullptr, LOAD_LIBRARY_SEARCH_APPLICATION_DIR | LOAD_LIBRARY_SEARCH_SYSTEM32); } if (hMod) { diff --git a/plugins/xpad/xpad.cpp b/plugins/xpad/xpad.cpp index 4da8b77816..f60cc2edeb 100644 --- a/plugins/xpad/xpad.cpp +++ b/plugins/xpad/xpad.cpp @@ -643,12 +643,13 @@ LRESULT WINAPI PADwndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) EXPORT_C_(UINT32) PADinit(UINT32 flags) { - DWORD loadFlags = LOAD_LIBRARY_SEARCH_APPLICATION_DIR | LOAD_LIBRARY_SEARCH_SYSTEM32; - - s_xInputDll = LoadLibraryEx(L"xinput1_3.dll", nullptr, loadFlags); + // Use LoadLibrary and not LoadLibraryEx for XInput 1.3, since some + // Windows 7 systems have issues with it. + // TODO: Only load XInput 1.4 for Windows 8+? Or implement the SCP extension? + s_xInputDll = LoadLibrary(L"xinput1_3.dll"); if (s_xInputDll == nullptr && IsWindows8OrGreater()) { - s_xInputDll = LoadLibraryEx(L"XInput1_4.dll", nullptr, loadFlags); + s_xInputDll = LoadLibraryEx(L"XInput1_4.dll", nullptr, LOAD_LIBRARY_SEARCH_APPLICATION_DIR | LOAD_LIBRARY_SEARCH_SYSTEM32); } if (s_xInputDll == nullptr) {