mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-11 05:26:24 +02:00
Rework the step functions.
This commit is contained in:
1 parent
a730f01c53
commit
828523165f
2 files changed
+25
-14
No files matched your search
@@ -208,11 +208,19 @@ void CDisasm::step(CPUStepType stepType)
|
||||
ptr->setDontRedraw(true);
|
||||
lastTicks_ = CoreTiming::GetTicks();
|
||||
|
||||
u32 stepSize = ptr->getInstructionSizeAt(cpu->GetPC());
|
||||
u32 newAddress = Core_PerformStep(cpu, stepType, stepSize);
|
||||
u32 oldAddress = cpu->GetPC();
|
||||
u32 stepSize = ptr->getInstructionSizeAt(oldAddress);
|
||||
Core_PerformStep(cpu, stepType, stepSize);
|
||||
|
||||
Sleep(1);
|
||||
ptr->scrollStepping(newAddress);
|
||||
// At this point, the step should be done, and the new address is just PC.
|
||||
// Ideally, this part should be done as a reaction to an update message and not directly here.
|
||||
// That way we could get rid of the sleep.
|
||||
u32 newAddress = cpu->GetPC();
|
||||
if (newAddress > oldAddress && newAddress < oldAddress + 12) {
|
||||
// Heuristic for when to scroll at the edge rather than jump the window.
|
||||
ptr->scrollStepping(newAddress);
|
||||
}
|
||||
ptr->gotoAddr(newAddress);
|
||||
UpdateDialog();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user