GE Debugger: Clear after replay finished.

This commit is contained in:
Unknown W. Brackets committed 2017-06-04 10:38:53 -07:00
1 parent 82beb726fc
commit e45b04a699
2 files changed
+13 -3

No files matched your search

+12 -3
View File
@@ -366,6 +366,10 @@ bool IsActive() {
return active;
}
void Activate() {
nextFrame = true;
}
void NotifyCommand(u32 pc) {
if (!active) {
return;
@@ -634,6 +638,9 @@ static void ExecuteFree() {
for (int level = 0; level < 8; ++level) {
FreePSPPointer(execTexturePtrs[level]);
}
commands.clear();
pushbuf.clear();
}
static bool ExecuteCommands() {
@@ -698,8 +705,6 @@ static bool ExecuteCommands() {
}
}
ExecuteFree();
return true;
}
@@ -730,6 +735,7 @@ bool RunMountedReplay() {
read += pspFileSystem.ReadFile(fp, (u8 *)&commands[i].ptr, sizeof(commands[i].ptr));
if (read != sizeof(commands[i].type) + sizeof(commands[i].sz) + sizeof(commands[i].ptr)) {
ERROR_LOG(SYSTEM, "Truncated GE dump");
ExecuteFree();
return false;
}
}
@@ -737,12 +743,15 @@ bool RunMountedReplay() {
pushbuf.resize(bufsz);
if (pspFileSystem.ReadFile(fp, pushbuf.data(), bufsz) != bufsz) {
ERROR_LOG(SYSTEM, "Truncated GE dump");
ExecuteFree();
return false;
}
pspFileSystem.CloseFile(fp);
return ExecuteCommands();
bool success = ExecuteCommands();
ExecuteFree();
return success;
}
};
+1
View File
@@ -22,6 +22,7 @@
namespace GPURecord {
bool IsActive();
void Activate();
void NotifyCommand(u32 pc);
void NotifyMemcpy(u32 dest, u32 src, u32 sz);