Skip to content

Commit

Permalink
Don't draw overlays into screenshots.
Browse files Browse the repository at this point in the history
Proposed by "Propose Panic" on Discord.
  • Loading branch information
hrydgard committed Jan 21, 2024
1 parent 789c7e5 commit 7479e24
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion UI/OnScreenDisplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ static inline const char *DeNull(const char *ptr) {
return ptr ? ptr : "";
}

extern bool g_TakeScreenshot;

static const float g_atlasIconSize = 36.0f;
static const float extraTextScale = 0.7f;

Expand Down Expand Up @@ -236,7 +238,7 @@ static void RenderLeaderboardTracker(UIContext &dc, const Bounds &bounds, const
}

void OnScreenMessagesView::Draw(UIContext &dc) {
if (!g_Config.bShowOnScreenMessages) {
if (!g_Config.bShowOnScreenMessages || g_TakeScreenshot) {
return;
}

Expand Down

0 comments on commit 7479e24

Please sign in to comment.