Some debug overlays don't make sense when not in-game, disable them. Minor feedback fixes.

This commit is contained in:
Henrik Rydgård committed 2023-08-13 21:54:24 +02:00
1 parent 2cdcc413b7
commit dc4de340b3
5 files changed
+15 -7

No files matched your search

+7 -2
View File
@@ -6,6 +6,7 @@
#include "Core/HLE/sceSas.h"
#include "Core/ControlMapper.h"
#include "Core/Config.h"
#include "Core/System.h"
#include "GPU/GPU.h"
// TODO: This should be moved here or to Common, doesn't belong in /GPU
#include "GPU/Vulkan/DebugVisVulkan.h"
@@ -164,12 +165,16 @@ void DrawControlMapperOverlay(UIContext *ctx, const Bounds &bounds, const Contro
}
void DrawDebugOverlay(UIContext *ctx, const Bounds &bounds, DebugOverlay overlay) {
bool inGame = GetUIState() == UISTATE_INGAME;
switch (overlay) {
case DebugOverlay::DEBUG_STATS:
DrawDebugStats(ctx, ctx->GetLayoutBounds());
if (!inGame)
DrawDebugStats(ctx, ctx->GetLayoutBounds());
break;
case DebugOverlay::FRAME_GRAPH:
DrawFrameTimes(ctx, ctx->GetLayoutBounds());
if (!inGame)
DrawFrameTimes(ctx, ctx->GetLayoutBounds());
break;
case DebugOverlay::FRAME_TIMING:
DrawFrameTiming(ctx, ctx->GetLayoutBounds());