NSF: Don't reset track time to 0 after changing preferences

This commit is contained in:
Souryo 2016-06-26 15:51:50 -04:00
parent a3e610ffeb
commit ed3b5422fe

View File

@ -989,7 +989,7 @@ namespace Mesen.GUI.Forms
ResourceHelper.ApplyResources(this); ResourceHelper.ApplyResources(this);
UpdateMenus(); UpdateMenus();
InitializeFdsDiskMenu(); InitializeFdsDiskMenu();
InitializeNsfMode(); InitializeNsfMode(true);
} }
} }
@ -1404,11 +1404,10 @@ namespace Mesen.GUI.Forms
UpdateEmulationSpeedMenu(); UpdateEmulationSpeedMenu();
} }
private void InitializeNsfMode(bool updateTextOnly = false)
private void InitializeNsfMode()
{ {
if(this.InvokeRequired) { if(this.InvokeRequired) {
this.BeginInvoke((MethodInvoker)(() => this.InitializeNsfMode())); this.BeginInvoke((MethodInvoker)(() => this.InitializeNsfMode(updateTextOnly)));
} else { } else {
if(InteropEmu.IsNsf()) { if(InteropEmu.IsNsf()) {
if(!this._isNsfPlayerMode) { if(!this._isNsfPlayerMode) {
@ -1417,10 +1416,12 @@ namespace Mesen.GUI.Forms
} }
this._isNsfPlayerMode = true; this._isNsfPlayerMode = true;
this.ctrlNsfPlayer.UpdateText(); this.ctrlNsfPlayer.UpdateText();
this.ctrlNsfPlayer.ResetCount(); if(!updateTextOnly) {
this.ctrlNsfPlayer.ResetCount();
}
this.ctrlNsfPlayer.Visible = true; this.ctrlNsfPlayer.Visible = true;
this.ctrlNsfPlayer.Focus(); this.ctrlNsfPlayer.Focus();
_currentGame = InteropEmu.NsfGetHeader().GetSongName(); _currentGame = InteropEmu.NsfGetHeader().GetSongName();
} else { } else {
this.MinimumSize = new Size(335, 320); this.MinimumSize = new Size(335, 320);