mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Fix messed up logic
This commit is contained in:
1 parent
8f698d552b
commit
4abda21699
2 files changed
+15
-13
No files matched your search
@@ -89,7 +89,6 @@ class CtrlDisAsmView
|
||||
bool searching;
|
||||
bool dontRedraw;
|
||||
bool keyTaken;
|
||||
bool stepScrolling;
|
||||
|
||||
void assembleOpcode(u32 address, std::string defaultText);
|
||||
void disassembleToFile();
|
||||
|
||||
@@ -168,27 +168,30 @@ void CDisasm::stepInto()
|
||||
|
||||
// If the current PC is on a breakpoint, the user doesn't want to do nothing.
|
||||
CBreakPoints::SetSkipFirst(currentMIPS->pc);
|
||||
u32 newAddress = currentPc+cpu->getInstructionSize(0);
|
||||
|
||||
MIPSAnalyst::MipsOpcodeInfo info = MIPSAnalyst::GetOpcodeInfo(cpu,cpu->GetPC());
|
||||
MIPSAnalyst::MipsOpcodeInfo info = MIPSAnalyst::GetOpcodeInfo(cpu,currentPc);
|
||||
if (info.isBranch)
|
||||
{
|
||||
u32 newAddress = currentPc+cpu->getInstructionSize(0);
|
||||
if (newAddress == windowEnd-4)
|
||||
ptr->scrollWindow(1);
|
||||
else if (newAddress == windowEnd)
|
||||
ptr->scrollWindow(2);
|
||||
} else {
|
||||
if (!currentMIPS->inDelaySlot)
|
||||
bool scroll = true;
|
||||
if (currentMIPS->inDelaySlot)
|
||||
{
|
||||
MIPSAnalyst::MipsOpcodeInfo prevInfo = MIPSAnalyst::GetOpcodeInfo(cpu,cpu->GetPC()-cpu->getInstructionSize(0));
|
||||
if (!prevInfo.isBranch || (prevInfo.isConditional && !prevInfo.conditionMet))
|
||||
{
|
||||
u32 newAddress = currentPc+cpu->getInstructionSize(0);
|
||||
if (newAddress == windowEnd-4)
|
||||
ptr->scrollWindow(1);
|
||||
else if (newAddress == windowEnd)
|
||||
ptr->scrollWindow(2);
|
||||
}
|
||||
MIPSAnalyst::MipsOpcodeInfo prevInfo = MIPSAnalyst::GetOpcodeInfo(cpu,currentPc-cpu->getInstructionSize(0));
|
||||
if (!prevInfo.isConditional || prevInfo.conditionMet)
|
||||
scroll = false;
|
||||
}
|
||||
|
||||
if (scroll)
|
||||
{
|
||||
if (newAddress == windowEnd-4)
|
||||
ptr->scrollWindow(1);
|
||||
else if (newAddress == windowEnd)
|
||||
ptr->scrollWindow(2);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user