Change software rasterizer screenshot code due to change in api just now.
This commit is contained in:
parent
71d70d896f
commit
4a9c8e6f55
|
@ -142,11 +142,7 @@ void SWRenderer::DrawTexture(u8 *texture, int width, int height)
|
||||||
if (s_bScreenshot)
|
if (s_bScreenshot)
|
||||||
{
|
{
|
||||||
std::lock_guard<std::mutex> lk(s_criticalScreenshot);
|
std::lock_guard<std::mutex> lk(s_criticalScreenshot);
|
||||||
u8 *data = new u8[width * 4 * height];
|
TextureToPng(texture, width*4, s_sScreenshotName.c_str(), width, height, false);
|
||||||
memcpy(data, texture, sizeof(u8) * 4 * width * height);
|
|
||||||
TextureToPng(data, width*4, s_sScreenshotName.c_str(), width, height, false);
|
|
||||||
delete[] data;
|
|
||||||
|
|
||||||
// Reset settings
|
// Reset settings
|
||||||
s_sScreenshotName.clear();
|
s_sScreenshotName.clear();
|
||||||
s_bScreenshot = false;
|
s_bScreenshot = false;
|
||||||
|
|
Loading…
Reference in New Issue