NSF: Show NSF name in title bar instead of "unknown" when no title is set

This commit is contained in:
Souryo 2017-08-13 11:00:43 -04:00
parent 95d2eefc8f
commit 8a2c2dc834
2 changed files with 7 additions and 1 deletions

View file

@ -815,7 +815,11 @@ namespace Mesen.GUI.Forms
this.ctrlNsfPlayer.Visible = true;
this.ctrlNsfPlayer.Focus();
_currentGame = InteropEmu.NsfGetHeader().GetSongName();
NsfHeader header = InteropEmu.NsfGetHeader();
if(header.HasSongName) {
_currentGame = header.GetSongName();
}
} else if(this._isNsfPlayerMode) {
this.MinimumSize = new Size(340, 280);
this.Size = this._nonNsfSize.Value;

View file

@ -1294,6 +1294,8 @@ namespace Mesen.GUI
return output;
}
public bool HasSongName { get { return this.GetSongName() != ResourceHelper.GetMessage("NsfUnknownField"); } }
public string GetSongName()
{
return ConvertString(this.SongName);