Refactor: Call GetLayoutBounds on the screen instead of the context where possible.

This will allow screens to influence the layout bounds in a unified way
This commit is contained in:
Henrik Rydgård committed 2026-03-14 13:07:48 +01:00
1 parent c5e0403ffd
commit 160e2c4f9b
15 files changed
+33 -26

No files matched your search

+6 -6
View File
@@ -220,26 +220,27 @@ void DrawFramebufferList(UIContext *ctx, GPUDebugInterface *gpu, const Bounds &b
}
void DrawControlMapperOverlay(UIContext *ctx, const Bounds &bounds, const ControlMapper &controlMapper) {
DrawControlDebug(ctx, controlMapper, ctx->GetLayoutBounds());
DrawControlDebug(ctx, controlMapper, ctx->GetLayoutBounds(false));
}
void DrawDebugOverlay(UIContext *ctx, const Bounds &bounds, DebugOverlay overlay) {
bool inGame = GetUIState() == UISTATE_INGAME;
const Bounds layoutBounds = ctx->GetLayoutBounds(false);
switch (overlay) {
case DebugOverlay::DEBUG_STATS:
if (inGame)
DrawDebugStats(ctx, ctx->GetLayoutBounds());
DrawDebugStats(ctx, layoutBounds);
break;
case DebugOverlay::FRAME_GRAPH:
if (inGame)
DrawFrameTimes(ctx, ctx->GetLayoutBounds());
DrawFrameTimes(ctx, layoutBounds);
break;
case DebugOverlay::FRAME_TIMING:
DrawFrameTiming(ctx, ctx->GetLayoutBounds());
DrawFrameTiming(ctx, layoutBounds);
break;
case DebugOverlay::Audio:
DrawAudioDebugStats(ctx, ctx->GetLayoutBounds());
DrawAudioDebugStats(ctx, layoutBounds);
break;
#if !PPSSPP_PLATFORM(UWP) && !PPSSPP_PLATFORM(SWITCH)
case DebugOverlay::GPU_PROFILE:
@@ -262,7 +263,6 @@ void DrawDebugOverlay(UIContext *ctx, const Bounds &bounds, DebugOverlay overlay
}
}
static const char *CPUCoreAsString(int core) {
switch (core) {
case 0: return "Interpreter";