You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -519,6 +522,7 @@ int FrameMan::SaveBitmap(SaveBitmapMode modeToSave, const std::string& nameBase,
519
522
if (nameBase.empty() || nameBase.size() <= 0) {
520
523
return -1;
521
524
}
525
+
set_palette(m_DefaultPalette);
522
526
523
527
// TODO: Remove this once GCC13 is released and switched to. std::format and std::chrono::time_zone are not part of latest libstdc++.
524
528
#if defined(__GNUC__) && __GNUC__ < 13
@@ -530,7 +534,7 @@ int FrameMan::SaveBitmap(SaveBitmapMode modeToSave, const std::string& nameBase,
530
534
531
535
std::array<char, 128> fullFileNameBuffer = {};
532
536
// We can't get sub-second precision from timeBuffer so we'll append absolute time to not overwrite the same file when dumping multiple times per second.
Copy file name to clipboardExpand all lines: Source/Managers/FrameMan.h
+4-1Lines changed: 4 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,9 @@ namespace RTE {
21
21
structBitmapDeleter {
22
22
voidoperator()(BITMAP* bitmap) const;
23
23
};
24
+
structSurfaceDeleter {
25
+
voidoperator()(SDL_Surface* surface) const;
26
+
};
24
27
25
28
/// The singleton manager over the composition of frames.
26
29
classFrameMan : publicSingleton<FrameMan> {
@@ -433,7 +436,7 @@ namespace RTE {
433
436
std::shared_ptr<BITMAP> m_BackBuffer8; //!< Screen backbuffer, always 8bpp, gets copied to the 32bpp buffer for post-processing.
434
437
std::unique_ptr<BITMAP, BitmapDeleter> m_BackBuffer32; //!< 32bpp backbuffer, only used for post-processing.
435
438
std::unique_ptr<BITMAP, BitmapDeleter> m_OverlayBitmap32; //!< 32bpp bitmap used for overlaying (fading in/out or darkening) the screen.
436
-
std::unique_ptr<BITMAP, BitmapDeleter> m_ScreenDumpBuffer; //!< Temporary buffer for making quick screencaps. This is used for color conversion between 32bpp and 24bpp so we can save the file.
439
+
std::unique_ptr<SDL_Surface, SurfaceDeleter> m_ScreenDumpBuffer; //!< Temporary buffer for making quick screencaps. This is used for color conversion between 32bpp and 24bpp so we can save the file.
437
440
std::unique_ptr<BITMAP, BitmapDeleter> m_WorldDumpBuffer; //!< Temporary buffer for making whole scene screencaps.
438
441
std::unique_ptr<BITMAP, BitmapDeleter> m_ScenePreviewDumpGradient; //!< BITMAP for the scene preview sky gradient (easier to load from a pre-made file because it's dithered).
439
442
std::unique_ptr<BITMAP, BitmapDeleter> m_ScreenDumpNamePlaceholder; //!< Dummy BITMAP for keeping naming continuity when saving ScreenDumps with multi-threading.
0 commit comments