feat: game can now save and display thumbnails, code rebuilt from the xbox one edition of the game

fix: Renderer::CaptureThumbnail now can capture thumbnails correctly
fix: renderTargetViews and renderTargetShaderResourceViews are no longer null
fix: texture saving functions were using BGRA instead of RGBA format
This commit is contained in:
Patoke
2026-03-04 06:51:35 -03:00
parent d7f4651c52
commit 36d18b209e
5 changed files with 262 additions and 37 deletions

View File

@@ -95,7 +95,7 @@ HRESULT Renderer::SaveTextureData(const char* szFilename, D3DXIMAGE_INFO* pSrcIn
image.width = pSrcInfo->Width;
image.height = pSrcInfo->Height;
image.version = PNG_IMAGE_VERSION;
image.format = PNG_FORMAT_BGRA;
image.format = PNG_FORMAT_RGBA;
png_image_write_to_file(&image, szFilename, NULL, ppDataOut, NULL, NULL);
return S_OK;
@@ -111,7 +111,7 @@ HRESULT Renderer::SaveTextureDataToMemory(void* pOutput, int outputCapacity, int
image.height = height;
dataEnd = (BYTE *)pOutput + outputCapacity;
image.version = PNG_IMAGE_VERSION;
image.format = PNG_FORMAT_BGRA;
image.format = PNG_FORMAT_RGBA;
dataStart = (BYTE*)pOutput;
dataCurr = (BYTE*)pOutput;