From 6f7017348e08200fe414a1ba0127af2b2fd42def Mon Sep 17 00:00:00 2001 From: ForserX Date: Mon, 28 Oct 2024 13:40:23 +0300 Subject: [PATCH] Fix "Make Thumbnail" without DxVK --- src/Editors/xrECore/Editor/DeviceScreenshot.cpp | 8 ++++---- src/Editors/xrECore/Editor/UILogForm.cpp | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Editors/xrECore/Editor/DeviceScreenshot.cpp b/src/Editors/xrECore/Editor/DeviceScreenshot.cpp index ce3a9be4ff..b21f6d8ddb 100644 --- a/src/Editors/xrECore/Editor/DeviceScreenshot.cpp +++ b/src/Editors/xrECore/Editor/DeviceScreenshot.cpp @@ -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; @@ -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 (); @@ -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); diff --git a/src/Editors/xrECore/Editor/UILogForm.cpp b/src/Editors/xrECore/Editor/UILogForm.cpp index d694ba2575..96ac974989 100644 --- a/src/Editors/xrECore/Editor/UILogForm.cpp +++ b/src/Editors/xrECore/Editor/UILogForm.cpp @@ -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;