@@ -128,8 +128,7 @@ std::vector<uint16> disassembly_addresses;
128
128
// this is used to keep track of addresses in operands of each printed instruction
129
129
std::vector<std::vector<uint16>> disassembly_operands;
130
130
// this is used to autoscroll the Disassembly window while keeping relative position of the ">" pointer inside this window
131
- unsigned int PC_pointerOffset = 0 ;
132
- int PCLine = -1 ;
131
+ unsigned int PCLine = -1 ;
133
132
// hack to help syntax highlighting find the PC
134
133
int beginningOfPCPointerLine = -1 ; // index of the first char within debug_str[] string, where the ">" line starts
135
134
static int skipLinesStatic = 0 ;
@@ -746,10 +745,9 @@ void DisassembleToWindow(HWND hWnd, int id, int scrollid, unsigned int addr, int
746
745
747
746
if (addr == X.PC )
748
747
{
749
- PC_pointerOffset = line_count;
748
+ PCLine = line_count;
750
749
beginningOfPCPointerLine = wcslen (debug_wstr);
751
750
wcscat (debug_wstr, L" >" );
752
- PCLine = line_count;
753
751
} else
754
752
{
755
753
wcscat (debug_wstr, L" " );
@@ -1006,11 +1004,11 @@ void UpdateDebugger(bool jump_to_pc)
1006
1004
RECT rect;
1007
1005
GetClientRect (GetDlgItem (hDebug, IDC_DEBUGGER_DISASSEMBLY), &rect);
1008
1006
unsigned int lines = (rect.bottom -rect.top ) / debugSystem->disasmFontHeight ;
1009
- if (PC_pointerOffset >= lines)
1010
- PC_pointerOffset = 0 ;
1007
+ if (PCLine >= lines)
1008
+ PCLine = 0 ;
1011
1009
1012
1010
// keep the relative position of the ">" pointer inside the Disassembly window
1013
- for (int i = PC_pointerOffset ; i > 0 ; i--)
1011
+ for (int i = PCLine ; i > 0 ; i--)
1014
1012
{
1015
1013
starting_address = ScrollUp (starting_address);
1016
1014
}
0 commit comments