Skip to content

Commit

Permalink
fixed bug that prevented taking screenshots
Browse files Browse the repository at this point in the history
  • Loading branch information
NicSavichev committed Dec 9, 2024
1 parent 71f445a commit 004e8a1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion prog/gameLibs/render/daBfg/runtime/runtime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,8 @@ void Runtime::initializeHistoryOfNewResources()
d3d::resource_barrier({prevTex, RB_RO_COPY_SOURCE, 0, texInfo.mipLevels});

for (int i = 0; i < texInfo.mipLevels; i++)
if (!tex->updateSubRegion(prevTex, i, 0, 0, 0, texInfo.w >> i, texInfo.h >> i, texInfo.d, i, 0, 0, 0))
if (
!tex->updateSubRegion(prevTex, i, 0, 0, 0, max(1, texInfo.w >> i), max(1, texInfo.h >> i), texInfo.d, i, 0, 0, 0))
{
logerr("failed to copy historical texture data for '%s'",
registry.knownNames.getName(res.frontendResources.back()));
Expand Down

0 comments on commit 004e8a1

Please sign in to comment.