From 90cdee321d61ca9181ae441799754ccdb7abdd3e Mon Sep 17 00:00:00 2001 From: mike Date: Fri, 22 Nov 2024 01:02:50 +0200 Subject: [PATCH] UE5.4-5.5 Fix --- Source/Blu/Private/BluEye.cpp | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/Source/Blu/Private/BluEye.cpp b/Source/Blu/Private/BluEye.cpp index 3ffb160..9b6c63f 100644 --- a/Source/Blu/Private/BluEye.cpp +++ b/Source/Blu/Private/BluEye.cpp @@ -188,21 +188,16 @@ void UBluEye::TextureUpdate(const void *Buffer, FUpdateTextureRegion2D *UpdateRe FPlatformMemory::Memcpy(RegionData->SrcData.GetData(), Buffer, RegionData->SrcData.Num()); ENQUEUE_RENDER_COMMAND(UpdateBLUICommand)( - [RegionData](FRHICommandList& CommandList) - { - for (uint32 RegionIndex = 0; RegionIndex < RegionData->NumRegions; RegionIndex++) + [RegionData](FRHICommandList& CommandList) { - //NB: FORCEINLINE void RHIUpdateTexture2D(FRHITexture2D* Texture, uint32 MipIndex, const struct FUpdateTextureRegion2D& UpdateRegion, uint32 SourcePitch, const uint8* SourceData) - RHIUpdateTexture2D(RegionData->Texture2DResource->TextureRHI->GetTexture2D(), 0, RegionData->Regions[RegionIndex], RegionData->SrcPitch, - RegionData->SrcData.GetData() - + RegionData->Regions[RegionIndex].SrcY * RegionData->SrcPitch - + RegionData->Regions[RegionIndex].SrcX * RegionData->SrcBpp); - } - - FMemory::Free(RegionData->Regions); - delete RegionData; - }); + for (uint32 RegionIndex = 0; RegionIndex < RegionData->NumRegions; RegionIndex++) + { + RHIUpdateTexture2D(RegionData->Texture2DResource->TextureRHI->GetTexture2D(), 0, RegionData->Regions[RegionIndex], RegionData->SrcPitch, RegionData->SrcData.GetData()); + } + FMemory::Free(RegionData->Regions); + delete RegionData; + }); } else {