From c1cf1af265cca8072e5933acb7ccd960dc211a4b Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 2 Oct 2017 00:49:29 +0200 Subject: [PATCH] Update d3d_device_create_offscreen_plain_surface --- gfx/common/d3d_common.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gfx/common/d3d_common.cpp b/gfx/common/d3d_common.cpp index 2e457ce2a5..1fd2e8e1ae 100644 --- a/gfx/common/d3d_common.cpp +++ b/gfx/common/d3d_common.cpp @@ -313,11 +313,20 @@ bool d3d_device_create_offscreen_plain_surface( void *data) { #if defined(HAVE_D3D9) +#ifdef __cplusplus if (SUCCEEDED(dev->CreateOffscreenPlainSurface(width, height, (D3DFORMAT)format, (D3DPOOL)pool, (LPDIRECT3DSURFACE*)surf_data, (HANDLE*)data))) return true; +#else + if (SUCCEEDED(IDirect3DDevice9_CreateOffscreenPlainSurface(dev, + width, height, + (D3DFORMAT)format, (D3DPOOL)pool, + (LPDIRECT3DSURFACE*)surf_data, + (HANDLE*)data))) + return true; +#endif #endif return false; }