rip out hacks that I put in to work around Game.Name being null
This commit is contained in:
parent
2f7ad6a676
commit
33d847e8ac
|
@ -106,34 +106,23 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
public void SetMainformMovieInfo()
|
public void SetMainformMovieInfo()
|
||||||
{
|
{
|
||||||
// TODO: this shoudln't be here it is copy paste from MainForm LoadRom
|
|
||||||
string gamename = string.Empty;
|
|
||||||
if (!string.IsNullOrWhiteSpace(Global.Game.Name)) // Prefer Game db name, else use the path
|
|
||||||
{
|
|
||||||
gamename = Global.Game.Name;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
gamename = Path.GetFileNameWithoutExtension(GlobalWin.MainForm.CurrentlyOpenRom.Split('|').Last());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Global.MovieSession.Movie.IsPlaying)
|
if (Global.MovieSession.Movie.IsPlaying)
|
||||||
{
|
{
|
||||||
Text = DisplayNameForSystem(Global.Game.System) + " - " + gamename + " - " + Path.GetFileName(Global.MovieSession.Movie.Filename);
|
Text = DisplayNameForSystem(Global.Game.System) + " - " + Global.Game.Name + " - " + Path.GetFileName(Global.MovieSession.Movie.Filename);
|
||||||
PlayRecordStatusButton.Image = Properties.Resources.Play;
|
PlayRecordStatusButton.Image = Properties.Resources.Play;
|
||||||
PlayRecordStatusButton.ToolTipText = "Movie is in playback mode";
|
PlayRecordStatusButton.ToolTipText = "Movie is in playback mode";
|
||||||
PlayRecordStatusButton.Visible = true;
|
PlayRecordStatusButton.Visible = true;
|
||||||
}
|
}
|
||||||
else if (Global.MovieSession.Movie.IsRecording)
|
else if (Global.MovieSession.Movie.IsRecording)
|
||||||
{
|
{
|
||||||
Text = DisplayNameForSystem(Global.Game.System) + " - " + gamename + " - " + Path.GetFileName(Global.MovieSession.Movie.Filename);
|
Text = DisplayNameForSystem(Global.Game.System) + " - " + Global.Game.Name + " - " + Path.GetFileName(Global.MovieSession.Movie.Filename);
|
||||||
PlayRecordStatusButton.Image = Properties.Resources.RecordHS;
|
PlayRecordStatusButton.Image = Properties.Resources.RecordHS;
|
||||||
PlayRecordStatusButton.ToolTipText = "Movie is in record mode";
|
PlayRecordStatusButton.ToolTipText = "Movie is in record mode";
|
||||||
PlayRecordStatusButton.Visible = true;
|
PlayRecordStatusButton.Visible = true;
|
||||||
}
|
}
|
||||||
else if (!Global.MovieSession.Movie.IsActive)
|
else if (!Global.MovieSession.Movie.IsActive)
|
||||||
{
|
{
|
||||||
Text = DisplayNameForSystem(Global.Game.System) + " - " + gamename;
|
Text = DisplayNameForSystem(Global.Game.System) + " - " + Global.Game.Name;
|
||||||
PlayRecordStatusButton.Image = Properties.Resources.Blank;
|
PlayRecordStatusButton.Image = Properties.Resources.Blank;
|
||||||
PlayRecordStatusButton.ToolTipText = "No movie is active";
|
PlayRecordStatusButton.ToolTipText = "No movie is active";
|
||||||
PlayRecordStatusButton.Visible = false;
|
PlayRecordStatusButton.Visible = false;
|
||||||
|
|
|
@ -3012,17 +3012,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
Global.Game.Status = nes.RomStatus;
|
Global.Game.Status = nes.RomStatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
string gamename = string.Empty;
|
Text = DisplayNameForSystem(loader.Game.System) + " - " + Global.Game.Name;
|
||||||
if (!string.IsNullOrWhiteSpace(loader.Game.Name)) // Prefer Game db name, else use the path
|
|
||||||
{
|
|
||||||
gamename = loader.Game.Name;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
gamename = Path.GetFileNameWithoutExtension(path.Split('|').Last());
|
|
||||||
}
|
|
||||||
|
|
||||||
Text = DisplayNameForSystem(loader.Game.System) + " - " + gamename;
|
|
||||||
|
|
||||||
Global.Rewinder.ResetRewindBuffer();
|
Global.Rewinder.ResetRewindBuffer();
|
||||||
|
|
||||||
|
|
|
@ -186,13 +186,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
private void RecordMovie_Load(object sender, EventArgs e)
|
private void RecordMovie_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var name = PathManager.FilesystemSafeName(Global.Game);
|
RecordBox.Text = PathManager.FilesystemSafeName(Global.Game);
|
||||||
if (string.IsNullOrEmpty(name))
|
|
||||||
{
|
|
||||||
name = Path.GetFileNameWithoutExtension(GlobalWin.MainForm.CurrentlyOpenRom.Split('|').Last());
|
|
||||||
}
|
|
||||||
|
|
||||||
RecordBox.Text = name;
|
|
||||||
StartFromCombo.SelectedIndex = 0;
|
StartFromCombo.SelectedIndex = 0;
|
||||||
DefaultAuthorCheckBox.Checked = Global.Config.UseDefaultAuthor;
|
DefaultAuthorCheckBox.Checked = Global.Config.UseDefaultAuthor;
|
||||||
if (Global.Config.UseDefaultAuthor)
|
if (Global.Config.UseDefaultAuthor)
|
||||||
|
|
Loading…
Reference in New Issue