mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 05:19:56 +00:00
Some debug overlays don't make sense when not in-game, disable them. Minor feedback fixes.
This commit is contained in:
parent
2cdcc413b7
commit
dc4de340b3
@ -1104,7 +1104,6 @@ VKContext::~VKContext() {
|
||||
}
|
||||
|
||||
void VKContext::BeginFrame(DebugFlags debugFlags) {
|
||||
// TODO: Bad dependency on g_Config here!
|
||||
renderManager_.BeginFrame(debugFlags & DebugFlags::PROFILE_TIMESTAMPS, debugFlags & DebugFlags::PROFILE_SCOPES);
|
||||
|
||||
FrameData &frame = frame_[vulkan_->GetCurFrame()];
|
||||
|
@ -216,12 +216,16 @@ void Core_RunLoop(GraphicsContext *ctx) {
|
||||
|
||||
bool menuThrottle = (GetUIState() != UISTATE_INGAME || !PSP_IsInited()) && GetUIState() != UISTATE_EXIT;
|
||||
|
||||
// In case it was pending, we're not in game anymore.
|
||||
double startTime = time_now_d();
|
||||
double startTime;
|
||||
if (menuThrottle) {
|
||||
startTime = time_now_d();
|
||||
}
|
||||
|
||||
NativeFrame(ctx);
|
||||
|
||||
if (menuThrottle) {
|
||||
// Simple throttling to not burn the GPU in the menu.
|
||||
// TODO: This should move into NativeFrame. Also, it's only necessary in MAILBOX or IMMEDIATE presentation modes.
|
||||
double diffTime = time_now_d() - startTime;
|
||||
int sleepTime = (int)(1000.0 / refreshRate) - (int)(diffTime * 1000.0);
|
||||
if (sleepTime > 0)
|
||||
|
@ -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());
|
||||
|
@ -1504,7 +1504,7 @@ bool EmuScreen::hasVisibleUI() {
|
||||
if (g_Config.bEnableCardboardVR || g_Config.bEnableNetworkChat)
|
||||
return true;
|
||||
// Debug UI.
|
||||
if ((DebugOverlay)g_Config.iDebugOverlay != DebugOverlay::OFF)
|
||||
if ((DebugOverlay)g_Config.iDebugOverlay != DebugOverlay::OFF || g_Config.bShowDeveloperMenu)
|
||||
return true;
|
||||
|
||||
// Exception information.
|
||||
|
@ -22,7 +22,7 @@ public:
|
||||
DestroyDrawContext();
|
||||
}
|
||||
void SwapInterval(int interval) override {}
|
||||
virtual void SwapBuffers() = 0;
|
||||
virtual void SwapBuffers() = 0;
|
||||
void Resize() override {}
|
||||
|
||||
virtual void GotBackbuffer();
|
||||
|
Loading…
Reference in New Issue
Block a user