1
0
mirror of https://github.com/FunkyFr3sh/cnc-ddraw.git synced 2025-03-15 06:04:49 +01:00

make d3d9 the default on every version of windows

This commit is contained in:
FunkyFr3sh 2018-10-12 16:50:18 +02:00
parent 8a0a56bffa
commit f70a085f08
2 changed files with 3 additions and 6 deletions

View File

@ -2,7 +2,7 @@
#define vxstr(a,b,c,d) str(a##.##b##.##c##.##d)
#define str(s) #s
#define VERSION 1,2,0,6
#define VERSION 1,2,1,0
1 VERSIONINFO
FILEVERSION VERSION

View File

@ -1263,13 +1263,10 @@ HRESULT WINAPI DirectDrawCreate(GUID FAR* lpGUID, LPDIRECTDRAW FAR* lplpDD, IUnk
{
printf("DirectDrawCreate: Using automatic renderer\n");
DWORD version = GetVersion();
DWORD major = (DWORD)(LOBYTE(LOWORD(version)));
DWORD minor = (DWORD)(HIBYTE(LOWORD(version)));
LPDIRECT3D9 d3d = NULL;
// Win XP/Vista/7 use Direct3D 9 - Win 8/10 and wine use OpenGL
if (!This->wine && (major < 6 || (major == 6 && minor == 1)) && (D3D9_hModule = LoadLibrary("d3d9.dll")))
// Windows = Direct3D 9, Wine = OpenGL
if (!This->wine && (D3D9_hModule = LoadLibrary("d3d9.dll")))
{
IDirect3D9 *(WINAPI *D3DCreate9)(UINT) =
(IDirect3D9 *(WINAPI *)(UINT))GetProcAddress(D3D9_hModule, "Direct3DCreate9");