summaryrefslogtreecommitdiffstats
path: root/video/out/vo_direct3d.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/out/vo_direct3d.c')
-rw-r--r--video/out/vo_direct3d.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/video/out/vo_direct3d.c b/video/out/vo_direct3d.c
index 38dde55af2..c99ea372f6 100644
--- a/video/out/vo_direct3d.c
+++ b/video/out/vo_direct3d.c
@@ -1466,13 +1466,13 @@ static mp_image_t *get_window_screenshot(d3d_priv *priv)
POINT pt;
D3DLOCKED_RECT locked_rect;
int width, height;
+ IDirect3DSurface9 *surface = NULL;
if (FAILED(IDirect3DDevice9_GetDisplayMode(priv->d3d_device, 0, &mode))) {
MP_ERR(priv, "GetDisplayMode failed.\n");
goto error_exit;
}
- IDirect3DSurface9 *surface = NULL;
if (FAILED(IDirect3DDevice9_CreateOffscreenPlainSurface(priv->d3d_device,
mode.Width, mode.Height, D3DFMT_A8R8G8B8, D3DPOOL_SYSTEMMEM, &surface,
NULL)))