From 75c57f8db7ef5f1b7c5c461e0b45f1a6e5e6c16d Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 2 Jun 2014 08:58:07 -0700 Subject: [PATCH] Don't use D3D9Ex by default, since it can change behavior for games which rely on D3D9 classic. --- src/video/windows/SDL_windowsvideo.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/video/windows/SDL_windowsvideo.c b/src/video/windows/SDL_windowsvideo.c index b7a69ca1a..daadc248d 100644 --- a/src/video/windows/SDL_windowsvideo.c +++ b/src/video/windows/SDL_windowsvideo.c @@ -185,8 +185,10 @@ D3D_LoadDLL( void **pD3DDLL, IDirect3D9 **pDirect3D9Interface ) *pD3DDLL = SDL_LoadObject("D3D9.DLL"); if (*pD3DDLL) { typedef IDirect3D9 *(WINAPI *Direct3DCreate9_t) (UINT SDKVersion); - typedef HRESULT (WINAPI *Direct3DCreate9Ex_t)(UINT SDKVersion, IDirect3D9Ex **ppD3D); Direct3DCreate9_t Direct3DCreate9Func; + +#ifdef USE_D3D9EX + typedef HRESULT (WINAPI *Direct3DCreate9Ex_t)(UINT SDKVersion, IDirect3D9Ex **ppD3D); Direct3DCreate9Ex_t Direct3DCreate9ExFunc; Direct3DCreate9ExFunc = (Direct3DCreate9Ex_t)SDL_LoadFunction(*pD3DDLL, "Direct3DCreate9Ex"); @@ -202,6 +204,7 @@ D3D_LoadDLL( void **pD3DDLL, IDirect3D9 **pDirect3D9Interface ) } } } +#endif /* USE_D3D9EX */ Direct3DCreate9Func = (Direct3DCreate9_t)SDL_LoadFunction(*pD3DDLL, "Direct3DCreate9"); if (Direct3DCreate9Func) {