mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 05:19:56 +00:00
Debugger: Prevent record with no commands.
Should cut down on empty dumps, at least.
This commit is contained in:
parent
f1afc51994
commit
c10b2035b5
@ -55,6 +55,7 @@
|
||||
#include "GPU/GPUInterface.h"
|
||||
#include "GPU/Common/FramebufferCommon.h"
|
||||
#include "GPU/Common/PostShader.h"
|
||||
#include "GPU/Debugger/Record.h"
|
||||
|
||||
struct FrameBufferState {
|
||||
u32 topaddr;
|
||||
@ -737,7 +738,7 @@ void __DisplayFlip(int cyclesLate) {
|
||||
// 4 here means 1 drawn, 4 skipped - so 12 fps minimum.
|
||||
maxFrameskip = g_Config.iFrameSkip;
|
||||
}
|
||||
if (numSkippedFrames >= maxFrameskip) {
|
||||
if (numSkippedFrames >= maxFrameskip || GPURecord::IsActivePending()) {
|
||||
skipFrame = false;
|
||||
}
|
||||
|
||||
|
@ -637,6 +637,10 @@ bool IsActive() {
|
||||
return active;
|
||||
}
|
||||
|
||||
bool IsActivePending() {
|
||||
return nextFrame || active;
|
||||
}
|
||||
|
||||
void Activate() {
|
||||
nextFrame = true;
|
||||
}
|
||||
@ -749,12 +753,12 @@ void NotifyUpload(u32 dest, u32 sz) {
|
||||
}
|
||||
|
||||
void NotifyFrame() {
|
||||
if (active && !writePending) {
|
||||
if (active && !writePending && !commands.empty()) {
|
||||
// Delay write until the first command of the next frame, so we get the right display buf.
|
||||
NOTICE_LOG(SYSTEM, "Recording complete - waiting to get display buffer");
|
||||
writePending = true;
|
||||
}
|
||||
if (nextFrame) {
|
||||
if (nextFrame && (gstate_c.skipDrawReason & SKIPDRAW_SKIPFRAME) == 0) {
|
||||
NOTICE_LOG(SYSTEM, "Recording starting...");
|
||||
active = true;
|
||||
nextFrame = false;
|
||||
|
@ -23,6 +23,7 @@
|
||||
namespace GPURecord {
|
||||
|
||||
bool IsActive();
|
||||
bool IsActivePending();
|
||||
void Activate();
|
||||
|
||||
void NotifyCommand(u32 pc);
|
||||
|
Loading…
Reference in New Issue
Block a user