mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
More memory cleanup
This commit is contained in:
1 parent
cd052ea640
commit
3bd41376da
43 files changed
+574
-527
No files matched your search
@@ -338,11 +338,12 @@ void CtrlDisplayListView::onMouseUp(WPARAM wParam, LPARAM lParam, int button)
|
||||
char *temp = new char[space];
|
||||
|
||||
char *p = temp, *end = temp + space;
|
||||
for (u32 pos = selectRangeStart; pos < selectRangeEnd && p < end; pos += instructionSize)
|
||||
{
|
||||
u32 opcode = Memory::Read_U32(pos);
|
||||
GPUDebugOp op = gpu->DisassembleOp(pos, opcode);
|
||||
p += snprintf(p, end - p, "%s\r\n", op.desc.c_str());
|
||||
if (Memory::IsValid4AlignedRange(selectRangeStart, selectRangeEnd - selectRangeStart)) {
|
||||
for (u32 pos = selectRangeStart; pos < selectRangeEnd && p < end; pos += instructionSize) {
|
||||
u32 opcode = Memory::ReadUnchecked_U32(pos);
|
||||
GPUDebugOp op = gpu->DisassembleOp(pos, opcode);
|
||||
p += snprintf(p, end - p, "%s\r\n", op.desc.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
W32Util::CopyTextToClipboard(wnd, temp);
|
||||
|
||||
@@ -77,10 +77,12 @@ static void BindPreviewProgram(GLSLProgram *&prog) {
|
||||
u32 CGEDebugger::PrimPreviewOp() {
|
||||
DisplayList list;
|
||||
if (gpu != nullptr && gpu->GetCurrentDisplayList(list)) {
|
||||
const u32 op = Memory::Read_U32(list.pc);
|
||||
const u32 cmd = op >> 24;
|
||||
if (cmd == GE_CMD_PRIM || cmd == GE_CMD_BEZIER || cmd == GE_CMD_SPLINE) {
|
||||
return op;
|
||||
if (Memory::IsValid4AlignedAddress(list.pc)) {
|
||||
const u32 op = Memory::ReadUnchecked_U32(list.pc);
|
||||
const u32 cmd = op >> 24;
|
||||
if (cmd == GE_CMD_PRIM || cmd == GE_CMD_BEZIER || cmd == GE_CMD_SPLINE) {
|
||||
return op;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
||||
Reference in new issue
Block a user