mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-07-11 01:25:07 +02:00
Decouple the last part of step()
This commit is contained in:
@@ -169,7 +169,7 @@ public:
|
||||
void setCurAddress(u32 newAddress, bool extend = false)
|
||||
{
|
||||
newAddress = manager.getStartAddress(newAddress);
|
||||
u32 after = manager.getNthNextAddress(newAddress,1);
|
||||
const u32 after = manager.getNthNextAddress(newAddress,1);
|
||||
curAddress = newAddress;
|
||||
selectRangeStart = extend ? std::min(selectRangeStart, newAddress) : newAddress;
|
||||
selectRangeEnd = extend ? std::max(selectRangeEnd, after) : after;
|
||||
|
||||
@@ -208,14 +208,15 @@ void CDisasm::step(CPUStepType stepType)
|
||||
ptr->setDontRedraw(true);
|
||||
lastTicks_ = CoreTiming::GetTicks();
|
||||
|
||||
u32 oldAddress = cpu->GetPC();
|
||||
u32 stepSize = ptr->getInstructionSizeAt(oldAddress);
|
||||
u32 stepSize = ptr->getInstructionSizeAt(cpu->GetPC());
|
||||
Core_PerformStep(cpu, stepType, stepSize);
|
||||
|
||||
Sleep(1);
|
||||
|
||||
// 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 oldAddress = ptr->getSelection();
|
||||
u32 newAddress = cpu->GetPC();
|
||||
if (newAddress > oldAddress && newAddress < oldAddress + 12) {
|
||||
// Heuristic for when to scroll at the edge rather than jump the window.
|
||||
|
||||
Reference in New Issue
Block a user