Skip to content

Commit

Permalink
Fix "Make Thumbnail" without DxVK
Browse files Browse the repository at this point in the history
  • Loading branch information
ForserX committed Oct 28, 2024
1 parent 1303129 commit 6f70173
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Editors/xrECore/Editor/DeviceScreenshot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ bool CEditorRenderDevice::MakeScreenshot(U32Vec& pixels, u32 width, u32 height)
Resources->Evict();

IDirect3DSurface9* poldZB=0;
IDirect3DSurface9* pZB=0;
// IDirect3DSurface9* pZB=0;
IDirect3DSurface9* pRT=0;
IDirect3DSurface9* poldRT=0;
D3DVIEWPORT9 oldViewport;
Expand All @@ -25,9 +25,9 @@ bool CEditorRenderDevice::MakeScreenshot(U32Vec& pixels, u32 width, u32 height)
CHK_DX(REDevice->GetViewport(&oldViewport));

CHK_DX(REDevice->CreateRenderTarget(width,height,D3DFMT_A8R8G8B8,D3DMULTISAMPLE_NONE,0,FALSE,&pRT,0));
CHK_DX(REDevice->CreateDepthStencilSurface(width,height,Caps.bStencil?D3DFMT_D24S8:D3DFMT_D24X8,D3DMULTISAMPLE_NONE,0,FALSE,&pZB,0));
//CHK_DX(REDevice->CreateDepthStencilSurface(width,height,Caps.bStencil?D3DFMT_D24S8:D3DFMT_D24X8,D3DMULTISAMPLE_NONE,0,FALSE,&pZB,0));
CHK_DX(REDevice->SetRenderTarget(0,pRT));
CHK_DX(REDevice->SetDepthStencilSurface(pZB));
//CHK_DX(REDevice->SetDepthStencilSurface(pZB));

UI->PrepareRedraw ();
EDevice->Begin ();
Expand Down Expand Up @@ -58,7 +58,7 @@ bool CEditorRenderDevice::MakeScreenshot(U32Vec& pixels, u32 width, u32 height)
CHK_DX(REDevice->SetRenderTarget(0,poldRT));
CHK_DX(REDevice->SetViewport(&oldViewport));

_RELEASE(pZB);
//_RELEASE(pZB);
_RELEASE(poldZB);
_RELEASE(pFB);
_RELEASE(pRT);
Expand Down
4 changes: 4 additions & 0 deletions src/Editors/xrECore/Editor/UILogForm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ void UILogForm::Update()

ImVec4 Color = { 1,1,1,1 };
const char* Str = GetList()->at(i).c_str();

if (Str == nullptr || xr_strlen(Str) == 0)
continue;

if (m_Filter[0] && strstr(Str, m_Filter)==0)
{
continue;
Expand Down

0 comments on commit 6f70173

Please sign in to comment.