Debugger: PPU Viewer - Don't update CHR viewer palette when paused & not set to refresh on pause/break
This commit is contained in:
parent
b3ef52fcd4
commit
69bc8a0087
2 changed files with 10 additions and 2 deletions
|
@ -409,7 +409,11 @@ namespace Mesen.GUI.Debugger.Controls
|
|||
InteropEmu.DebugGetState(ref state);
|
||||
int tileIndexOffset = state.PPU.ControlFlags.BackgroundPatternAddr == 0x1000 ? 256 : 0;
|
||||
|
||||
_chrViewer.SelectedPaletteIndex = paletteIndex;
|
||||
if(!InteropEmu.DebugIsExecutionStopped() || ConfigManager.Config.DebugInfo.PpuRefreshOnBreak) {
|
||||
//Only change the palette if execution is not stopped (or if we're configured to refresh the viewer on break/pause)
|
||||
//Otherwise, the CHR viewer will refresh its data (and it might not match the data we loaded at the specified scanline/cycle anymore)
|
||||
_chrViewer.SelectedPaletteIndex = paletteIndex;
|
||||
}
|
||||
_chrViewer.SelectedTileIndex = tileIndex + tileIndexOffset;
|
||||
OnSelectChrTile?.Invoke(null, EventArgs.Empty);
|
||||
}
|
||||
|
|
|
@ -211,7 +211,11 @@ namespace Mesen.GUI.Debugger
|
|||
private void ctrlSpriteViewer_OnSelectTilePalette(int tileIndex, int paletteIndex)
|
||||
{
|
||||
ctrlChrViewer.SelectedTileIndex = tileIndex;
|
||||
ctrlChrViewer.SelectedPaletteIndex = paletteIndex;
|
||||
if(!InteropEmu.DebugIsExecutionStopped() || ConfigManager.Config.DebugInfo.PpuRefreshOnBreak) {
|
||||
//Only change the palette if execution is not stopped (or if we're configured to refresh the viewer on break/pause)
|
||||
//Otherwise, the CHR viewer will refresh its data (and it might not match the data we loaded at the specified scanline/cycle anymore)
|
||||
ctrlChrViewer.SelectedPaletteIndex = paletteIndex;
|
||||
}
|
||||
tabMain.SelectTab(tpgChrViewer);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue