Dehardcode D3D_SDK_VERSION

This commit is contained in:
twinaphex 2018-01-03 18:14:54 +01:00
parent 30ba656f5c
commit 2424ffaa26
2 changed files with 10 additions and 3 deletions

View File

@ -1258,7 +1258,7 @@ endif
ifeq ($(HAVE_D3D9), 1)
HAVE_D3D_COMMON = 1
DEFINES += -DHAVE_D3D9
LIBS += -ld3d9 -ld3dx9 -ldxguid
LIBS += -ldxguid
OBJ += gfx/drivers_font/d3d_w32_font.o
ifeq ($(HAVE_CG), 1)
LIBS += -lcgD3D9

View File

@ -30,10 +30,17 @@
void *d3d_create(void)
{
UINT SDKVersion = 0;
#if defined(HAVE_D3D9)
return Direct3DCreate9(D3D_SDK_VERSION);
#ifndef _XBOX
SDKVersion = 31;
#endif
return Direct3DCreate9(SDKVersion);
#elif defined(HAVE_D3D8)
return Direct3DCreate8(D3D_SDK_VERSION);
#ifndef _XBOX
SDKVersion = 220;
#endif
return Direct3DCreate8(SDKVersion);
#endif
}