diff --git a/source/core/savegamehelp.cpp b/source/core/savegamehelp.cpp index b90fa3bfa..9a347f7dc 100644 --- a/source/core/savegamehelp.cpp +++ b/source/core/savegamehelp.cpp @@ -233,6 +233,13 @@ bool OpenSaveGameForWrite(const char* filename, const char *name) auto picfile = WriteSavegameChunk("savepic.png"); WriteSavePic(picfile, 240, 180); + mysnprintf(buf, countof(buf), GAMENAME " %s", GetVersionString()); + // put some basic info into the PNG so that this isn't lost when the image gets extracted. + M_AppendPNGText(picfile, "Software", buf); + M_AppendPNGText(picfile, "Title", name); + M_AppendPNGText(picfile, "Current Map", lev->labelName); + M_FinishPNG(picfile); + return true; } diff --git a/source/glbackend/glbackend.cpp b/source/glbackend/glbackend.cpp index 1b243dfc2..da6ad6039 100644 --- a/source/glbackend/glbackend.cpp +++ b/source/glbackend/glbackend.cpp @@ -56,6 +56,7 @@ F2DDrawer twodpsp; static int BufferLock = 0; TArray matrixArray; +void Draw2D(F2DDrawer* drawer, FRenderState& state); FileReader GetResource(const char* fn) { @@ -344,8 +345,14 @@ void WriteSavePic(FileWriter* file, int width, int height) RenderState.SetPassType(NORMAL_PASS); RenderState.EnableDrawBuffers(1, true); + screen->SetViewportRects(&bounds); bool didit = gi->GenerateSavePic(); + float Brightness = 8.f / (r_scenebrightness + 8.f); + screen->PostProcessScene(false, 0, Brightness, []() { + Draw2D(&twodpsp, *screen->RenderState()); // draws the weapon sprites + }); + xdim = oldx; ydim = oldy; videoSetViewableArea(oldwindowxy1.x, oldwindowxy1.y, oldwindowxy2.x, oldwindowxy2.y); @@ -476,8 +483,6 @@ int32_t r_scenebrightness = 0; -void Draw2D(F2DDrawer* drawer, FRenderState& state); - void videoShowFrame(int32_t w) { if (gl_ssao)