|
@@ -1527,7 +1527,7 @@ framebuffer_copy_to_ram(Texture *tex, int z, const DisplayRegion *dr, const Rend
|
|
|
// first.
|
|
// first.
|
|
|
D3DPOOL pool;
|
|
D3DPOOL pool;
|
|
|
|
|
|
|
|
- pool = D3DPOOL_SCRATCH;
|
|
|
|
|
|
|
+ pool = D3DPOOL_SYSTEMMEM;
|
|
|
hr = _d3d_device->CreateOffscreenPlainSurface(w, h, _screen->_display_mode.Format,
|
|
hr = _d3d_device->CreateOffscreenPlainSurface(w, h, _screen->_display_mode.Format,
|
|
|
pool,
|
|
pool,
|
|
|
&temp_surface,
|
|
&temp_surface,
|
|
@@ -1542,17 +1542,18 @@ framebuffer_copy_to_ram(Texture *tex, int z, const DisplayRegion *dr, const Rend
|
|
|
|
|
|
|
|
// Now we must copy from the backbuffer to our temporary surface.
|
|
// Now we must copy from the backbuffer to our temporary surface.
|
|
|
|
|
|
|
|
-/* ***** DX9 CopyRects */
|
|
|
|
|
-// hr = _d3d_device->CopyRects(backbuffer, &rect, 1, temp_surface, NULL);
|
|
|
|
|
- hr = -1;
|
|
|
|
|
|
|
+// DX8 VERSION hr = _d3d_device->CopyRects(backbuffer, &rect, 1, temp_surface, NULL);
|
|
|
|
|
+ hr = _d3d_device -> GetRenderTargetData (backbuffer, temp_surface);
|
|
|
|
|
|
|
|
if (FAILED(hr)) {
|
|
if (FAILED(hr)) {
|
|
|
- dxgsg9_cat.error() << "CopyRects failed" << D3DERRORSTRING(hr);
|
|
|
|
|
|
|
+ dxgsg9_cat.error() << "GetRenderTargetData failed" << D3DERRORSTRING(hr);
|
|
|
temp_surface->Release();
|
|
temp_surface->Release();
|
|
|
backbuffer->Release();
|
|
backbuffer->Release();
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ copy_inverted = true;
|
|
|
|
|
+
|
|
|
RELEASE(backbuffer, dxgsg9, "backbuffer", RELEASE_ONCE);
|
|
RELEASE(backbuffer, dxgsg9, "backbuffer", RELEASE_ONCE);
|
|
|
|
|
|
|
|
} else if (_cur_read_pixel_buffer & RenderBuffer::T_front) {
|
|
} else if (_cur_read_pixel_buffer & RenderBuffer::T_front) {
|