Debugger: Fixed a few refresh issues with PPU viewer

This commit is contained in:
Souryo 2016-11-29 20:44:22 -05:00
parent 671ef9e639
commit 825db35191
3 changed files with 17 additions and 8 deletions

View File

@ -22,9 +22,13 @@ namespace Mesen.GUI.Debugger.Controls
public ctrlChrViewer()
{
InitializeComponent();
bool designMode = (LicenseManager.UsageMode == LicenseUsageMode.Designtime);
if(!designMode) {
this.cboPalette.SelectedIndex = 0;
this.cboHighlightType.SelectedIndex = 0;
}
}
public void GetData()
{

View File

@ -228,13 +228,13 @@
this.lblShowFrameAt.AutoSize = true;
this.lblShowFrameAt.Location = new System.Drawing.Point(3, 6);
this.lblShowFrameAt.Name = "lblShowFrameAt";
this.lblShowFrameAt.Size = new System.Drawing.Size(137, 13);
this.lblShowFrameAt.Size = new System.Drawing.Size(266, 13);
this.lblShowFrameAt.TabIndex = 0;
this.lblShowFrameAt.Text = "Show PPU data at scanline";
this.lblShowFrameAt.Text = "When emulation is running, show PPU data at scanline";
//
// nudScanline
//
this.nudScanline.Location = new System.Drawing.Point(146, 3);
this.nudScanline.Location = new System.Drawing.Point(275, 3);
this.nudScanline.Maximum = new decimal(new int[] {
260,
0,
@ -259,7 +259,7 @@
//
this.lblCycle.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblCycle.AutoSize = true;
this.lblCycle.Location = new System.Drawing.Point(204, 6);
this.lblCycle.Location = new System.Drawing.Point(333, 6);
this.lblCycle.Name = "lblCycle";
this.lblCycle.Size = new System.Drawing.Size(53, 13);
this.lblCycle.TabIndex = 5;
@ -267,7 +267,7 @@
//
// nudCycle
//
this.nudCycle.Location = new System.Drawing.Point(263, 3);
this.nudCycle.Location = new System.Drawing.Point(392, 3);
this.nudCycle.Maximum = new decimal(new int[] {
340,
0,

View File

@ -55,7 +55,7 @@ namespace Mesen.GUI.Debugger
if(e.NotificationType == InteropEmu.ConsoleNotificationType.CodeBreak) {
this.GetData();
this.BeginInvoke((MethodInvoker)(() => this.RefreshViewers()));
} else if(e.NotificationType == InteropEmu.ConsoleNotificationType.PpuFrameDone) {
} else if(e.NotificationType == InteropEmu.ConsoleNotificationType.PpuViewerDisplayFrame) {
if(_autoRefreshCounter % 4 == 0) {
this.GetData();
}
@ -121,6 +121,11 @@ namespace Mesen.GUI.Debugger
private void tabMain_SelectedIndexChanged(object sender, EventArgs e)
{
this._selectedTab = this.tabMain.SelectedTab;
if(InteropEmu.DebugIsExecutionStopped()) {
//Refresh data when changing tabs when not running
this.GetData();
this.RefreshViewers();
}
}
}
}