From f70a085f0811200df163f5cc1ecec09cba421d55 Mon Sep 17 00:00:00 2001 From: FunkyFr3sh Date: Fri, 12 Oct 2018 16:50:18 +0200 Subject: [PATCH] make d3d9 the default on every version of windows --- ddraw.rc | 2 +- src/main.c | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/ddraw.rc b/ddraw.rc index b80dfc6..97270f5 100644 --- a/ddraw.rc +++ b/ddraw.rc @@ -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 diff --git a/src/main.c b/src/main.c index bc2adac..4a2c5db 100644 --- a/src/main.c +++ b/src/main.c @@ -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");