It seems that the screenshot is not being generated properly after this code:
IDirect3DBaseTexture9* pBaseTexture = nullptr;
pDevice->GetTexture(0, &pBaseTexture);
if (pBaseTexture != NULL) {
std::cout << "Saving screenshot..." << std::endl;
const wchar_t* fileName = L"C:\Screenshots\pBaseTexture.png";
D3DXSaveTextureToFileW(fileName, D3DXIFF_PNG, pBaseTexture, nullptr);
}
I’m trying to print an image using a d3d9 hook.
New contributor
Gabriel Henrique Hoppe Coelho is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.