src/render/direct3d/SDL_render_d3d.c
changeset 9085 7cafa57c23ec
parent 9074 86a6f6d92960
child 9619 b94b6d0bff0f
equal deleted inserted replaced
9084:a8cbb653aea4 9085:7cafa57c23ec
  1829     LPDIRECT3DSURFACE9 surface;
  1829     LPDIRECT3DSURFACE9 surface;
  1830     RECT d3drect;
  1830     RECT d3drect;
  1831     D3DLOCKED_RECT locked;
  1831     D3DLOCKED_RECT locked;
  1832     HRESULT result;
  1832     HRESULT result;
  1833 
  1833 
  1834     result = IDirect3DDevice9_GetBackBuffer(data->device, 0, 0, D3DBACKBUFFER_TYPE_MONO, &backBuffer);
  1834     if (data->currentRenderTarget) {
  1835     if (FAILED(result)) {
  1835         backBuffer = data->currentRenderTarget;
  1836         return D3D_SetError("GetBackBuffer()", result);
  1836     } else {
       
  1837         backBuffer = data->defaultRenderTarget;
  1837     }
  1838     }
  1838 
  1839 
  1839     result = IDirect3DSurface9_GetDesc(backBuffer, &desc);
  1840     result = IDirect3DSurface9_GetDesc(backBuffer, &desc);
  1840     if (FAILED(result)) {
  1841     if (FAILED(result)) {
  1841         IDirect3DSurface9_Release(backBuffer);
  1842         IDirect3DSurface9_Release(backBuffer);
  1872                       format, pixels, pitch);
  1873                       format, pixels, pitch);
  1873 
  1874 
  1874     IDirect3DSurface9_UnlockRect(surface);
  1875     IDirect3DSurface9_UnlockRect(surface);
  1875 
  1876 
  1876     IDirect3DSurface9_Release(surface);
  1877     IDirect3DSurface9_Release(surface);
  1877     IDirect3DSurface9_Release(backBuffer);
       
  1878 
  1878 
  1879     return 0;
  1879     return 0;
  1880 }
  1880 }
  1881 
  1881 
  1882 static void
  1882 static void