Skip to content

Commit

Permalink
Use D3DPOOL_SYSTEMMEM in CreateOffscreenPlainSurface first (#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
elishacloud authored and crosire committed Jan 14, 2020
1 parent 7b4a8ff commit 2c334d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/d3d8to9_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -481,9 +481,9 @@ HRESULT STDMETHODCALLTYPE Direct3DDevice8::CreateImageSurface(UINT Width, UINT H

IDirect3DSurface9 *SurfaceInterface = nullptr;

const HRESULT hr = ProxyInterface->CreateOffscreenPlainSurface(Width, Height, Format, D3DPOOL_SCRATCH, &SurfaceInterface, nullptr);
const HRESULT hr = ProxyInterface->CreateOffscreenPlainSurface(Width, Height, Format, D3DPOOL_SYSTEMMEM, &SurfaceInterface, nullptr);

if (FAILED(hr))
if (FAILED(hr) && FAILED(ProxyInterface->CreateOffscreenPlainSurface(Width, Height, Format, D3DPOOL_SCRATCH, &SurfaceInterface, nullptr)))
{
#ifndef D3D8TO9NOLOG
LOG << "> 'IDirect3DDevice9::CreateOffscreenPlainSurface' failed with error code " << std::hex << hr << std::dec << "!" << std::endl;
Expand Down

0 comments on commit 2c334d5

Please sign in to comment.