From 940c68983d8e4a6e0edb887bd3d51cacfb259439 Mon Sep 17 00:00:00 2001 From: Echo J Date: Mon, 4 Nov 2024 16:04:56 +0200 Subject: [PATCH] DDraw: Use a pragma for DirectDrawCreateEx export on MSVC The .def file is either going to have issues on MSVC or MinGW GCC (so replace it with a pragma on MSVC) --- DDraw/DDraw.def | 2 +- DDraw/DDraw.vcxproj | 5 +---- DDraw/dllmain.cpp | 1 + 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/DDraw/DDraw.def b/DDraw/DDraw.def index 7eb9b71..6e837db 100644 --- a/DDraw/DDraw.def +++ b/DDraw/DDraw.def @@ -1,3 +1,3 @@ LIBRARY DDRAW EXPORTS - DirectDrawCreateEx=_DirectDrawCreateEx@16 @10 \ No newline at end of file + DirectDrawCreateEx = DirectDrawCreateEx@16 diff --git a/DDraw/DDraw.vcxproj b/DDraw/DDraw.vcxproj index b2b3976..1d4c13d 100644 --- a/DDraw/DDraw.vcxproj +++ b/DDraw/DDraw.vcxproj @@ -83,7 +83,6 @@ /Zc:threadSafeInit- /Zc:strictStrings %(AdditionalOptions) - ddraw.def Windows shell32.dll;shlwapi.dll;%(DelayLoadDLLs) true @@ -113,7 +112,6 @@ true true - ddraw.def Windows shell32.dll;shlwapi.dll;%(DelayLoadDLLs) true @@ -143,7 +141,6 @@ true true - ddraw.def Windows shell32.dll;shlwapi.dll;%(DelayLoadDLLs) true @@ -172,4 +169,4 @@ - \ No newline at end of file + diff --git a/DDraw/dllmain.cpp b/DDraw/dllmain.cpp index e417009..99c9507 100644 --- a/DDraw/dllmain.cpp +++ b/DDraw/dllmain.cpp @@ -14,6 +14,7 @@ #include "Desktop.h" #pragma comment(lib, "shlwapi.lib") +#pragma comment(linker, "/EXPORT:DirectDrawCreateEx=_DirectDrawCreateEx@16") extern "C" HRESULT WINAPI DirectDrawCreateEx(GUID FAR *lpGUID, LPVOID *lplpDD, REFIID iid, IUnknown FAR *pUnkOuter) {