mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-30 09:43:45 +01:00
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:
1 parent
c5e0403ffd
commit
160e2c4f9b
15 files changed
+33
-26
No files matched your search
+6
-6
@@ -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";
|
||||
|
||||
Reference in new issue
Block a user