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)
This commit is contained in:
Echo J 2024-11-04 16:04:56 +02:00
parent 1af97eef26
commit 940c68983d
3 changed files with 3 additions and 5 deletions

View file

@ -1,3 +1,3 @@
LIBRARY DDRAW
EXPORTS
DirectDrawCreateEx=_DirectDrawCreateEx@16 @10
DirectDrawCreateEx = DirectDrawCreateEx@16

View file

@ -83,7 +83,6 @@
<AdditionalOptions>/Zc:threadSafeInit- /Zc:strictStrings %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<ModuleDefinitionFile>ddraw.def</ModuleDefinitionFile>
<SubSystem>Windows</SubSystem>
<DelayLoadDLLs>shell32.dll;shlwapi.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
<LargeAddressAware>true</LargeAddressAware>
@ -113,7 +112,6 @@
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<ModuleDefinitionFile>ddraw.def</ModuleDefinitionFile>
<SubSystem>Windows</SubSystem>
<DelayLoadDLLs>shell32.dll;shlwapi.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
<LargeAddressAware>true</LargeAddressAware>
@ -143,7 +141,6 @@
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<ModuleDefinitionFile>ddraw.def</ModuleDefinitionFile>
<SubSystem>Windows</SubSystem>
<DelayLoadDLLs>shell32.dll;shlwapi.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
<LargeAddressAware>true</LargeAddressAware>

View file

@ -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)
{