Skip to content

Commit

Permalink
добавлена опция -ss_png для сохранения скриншотов в формате png
Browse files Browse the repository at this point in the history
  • Loading branch information
abramcumner committed Jan 17, 2017
1 parent 6bf9e4c commit 568a3c8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions xray/Layers/xrRender/r__screenshot.cpp
Expand Up @@ -346,6 +346,10 @@ void CRender::ScreenshotImpl (ScreenshotMode mode, LPCSTR name, CMemoryWriter* m
format = D3DXIFF_TGA;
ext = ".tga";
}
else if (strstr(Core.Params, "-ss_png")) {
format = D3DXIFF_PNG;
ext = ".png";
}
sprintf_s (buf,sizeof(buf),"ss_%s_%s_(%s)%s",Core.UserName,timestamp(t_stemp),(g_pGameLevel)?g_pGameLevel->name().c_str():"mainmenu", ext);
ID3DBlob* saved = 0;
CHK_DX (D3DXSaveSurfaceToFileInMemory (&saved, format,pFB,0,0));
Expand Down

0 comments on commit 568a3c8

Please sign in to comment.