From 3553b06350448dfef3897dbced59fcacb2dc4040 Mon Sep 17 00:00:00 2001 From: adelikat Date: Sat, 26 Apr 2014 17:54:56 +0000 Subject: [PATCH] Play Movie - Match current game hash not current game name --- BizHawk.Client.Common/config/Config.cs | 2 +- .../movie/PlayMovie.Designer.cs | 30 +++++++++---------- BizHawk.Client.EmuHawk/movie/PlayMovie.cs | 10 +++---- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/BizHawk.Client.Common/config/Config.cs b/BizHawk.Client.Common/config/Config.cs index 2046db28e8..f0ae2093ef 100644 --- a/BizHawk.Client.Common/config/Config.cs +++ b/BizHawk.Client.Common/config/Config.cs @@ -518,7 +518,7 @@ namespace BizHawk.Client.Common //Play Movie Dialog public bool PlayMovie_IncludeSubdir = true; public bool PlayMovie_ShowStateFiles = false; - public bool PlayMovie_MatchGameName = false; + public bool PlayMovie_MatchHash = false; //TI83 public ToolDialogSettings TI83KeypadSettings = new ToolDialogSettings(); diff --git a/BizHawk.Client.EmuHawk/movie/PlayMovie.Designer.cs b/BizHawk.Client.EmuHawk/movie/PlayMovie.Designer.cs index 6ece87686f..72a04fbc52 100644 --- a/BizHawk.Client.EmuHawk/movie/PlayMovie.Designer.cs +++ b/BizHawk.Client.EmuHawk/movie/PlayMovie.Designer.cs @@ -45,7 +45,7 @@ this.ShowStateFiles = new System.Windows.Forms.CheckBox(); this.Scan = new System.Windows.Forms.Button(); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); - this.MatchGameNameCheckBox = new System.Windows.Forms.CheckBox(); + this.MatchHashCheckBox = new System.Windows.Forms.CheckBox(); this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components); this.editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.MovieView = new BizHawk.Client.EmuHawk.VirtualListView(); @@ -219,30 +219,30 @@ this.Scan.UseVisualStyleBackColor = true; this.Scan.Click += new System.EventHandler(this.Scan_Click); // - // MatchGameNameCheckBox + // MatchHashCheckBox // - this.MatchGameNameCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.MatchGameNameCheckBox.AutoSize = true; - this.MatchGameNameCheckBox.Location = new System.Drawing.Point(260, 337); - this.MatchGameNameCheckBox.Name = "MatchGameNameCheckBox"; - this.MatchGameNameCheckBox.Size = new System.Drawing.Size(150, 17); - this.MatchGameNameCheckBox.TabIndex = 56; - this.MatchGameNameCheckBox.Text = "Match current game name"; - this.MatchGameNameCheckBox.UseVisualStyleBackColor = true; - this.MatchGameNameCheckBox.CheckedChanged += new System.EventHandler(this.MatchGameNameCheckBox_CheckedChanged); + this.MatchHashCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.MatchHashCheckBox.AutoSize = true; + this.MatchHashCheckBox.Location = new System.Drawing.Point(260, 337); + this.MatchHashCheckBox.Name = "MatchHashCheckBox"; + this.MatchHashCheckBox.Size = new System.Drawing.Size(147, 17); + this.MatchHashCheckBox.TabIndex = 56; + this.MatchHashCheckBox.Text = "Match current game hash"; + this.MatchHashCheckBox.UseVisualStyleBackColor = true; + this.MatchHashCheckBox.CheckedChanged += new System.EventHandler(this.MatchHashCheckBox_CheckedChanged); // // contextMenuStrip1 // this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.editToolStripMenuItem}); this.contextMenuStrip1.Name = "contextMenuStrip1"; - this.contextMenuStrip1.Size = new System.Drawing.Size(153, 48); + this.contextMenuStrip1.Size = new System.Drawing.Size(95, 26); // // editToolStripMenuItem // this.editToolStripMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.CutHS; this.editToolStripMenuItem.Name = "editToolStripMenuItem"; - this.editToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.editToolStripMenuItem.Size = new System.Drawing.Size(94, 22); this.editToolStripMenuItem.Text = "&Edit"; this.editToolStripMenuItem.Click += new System.EventHandler(this.EditMenuItem_Click); // @@ -306,7 +306,7 @@ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.CancelButton = this.Cancel; this.ClientSize = new System.Drawing.Size(774, 387); - this.Controls.Add(this.MatchGameNameCheckBox); + this.Controls.Add(this.MatchHashCheckBox); this.Controls.Add(this.Scan); this.Controls.Add(this.ShowStateFiles); this.Controls.Add(this.IncludeSubDirectories); @@ -354,7 +354,7 @@ private System.Windows.Forms.CheckBox ShowStateFiles; private System.Windows.Forms.Button Scan; private System.Windows.Forms.ToolTip toolTip1; - private System.Windows.Forms.CheckBox MatchGameNameCheckBox; + private System.Windows.Forms.CheckBox MatchHashCheckBox; private System.Windows.Forms.ContextMenuStrip contextMenuStrip1; private System.Windows.Forms.ToolStripMenuItem editToolStripMenuItem; } diff --git a/BizHawk.Client.EmuHawk/movie/PlayMovie.cs b/BizHawk.Client.EmuHawk/movie/PlayMovie.cs index 372578b04d..9b79fb743b 100644 --- a/BizHawk.Client.EmuHawk/movie/PlayMovie.cs +++ b/BizHawk.Client.EmuHawk/movie/PlayMovie.cs @@ -36,7 +36,7 @@ namespace BizHawk.Client.EmuHawk { IncludeSubDirectories.Checked = Global.Config.PlayMovie_IncludeSubdir; ShowStateFiles.Checked = Global.Config.PlayMovie_ShowStateFiles; - MatchGameNameCheckBox.Checked = Global.Config.PlayMovie_MatchGameName; + MatchHashCheckBox.Checked = Global.Config.PlayMovie_MatchHash; ScanFiles(); PreHighlightMovie(); } @@ -142,8 +142,8 @@ namespace BizHawk.Client.EmuHawk movie.PreLoadText(hf); // Don't do this from browse - if (movie.Header[HeaderKeys.GAMENAME] == Global.Game.Name || - Global.Config.PlayMovie_MatchGameName == false || force) + if (movie.Header[HeaderKeys.SHA1] == Global.Game.Hash || + Global.Config.PlayMovie_MatchHash == false || force) { _movieList.Add(movie); } @@ -652,9 +652,9 @@ namespace BizHawk.Client.EmuHawk PreHighlightMovie(); } - private void MatchGameNameCheckBox_CheckedChanged(object sender, EventArgs e) + private void MatchHashCheckBox_CheckedChanged(object sender, EventArgs e) { - Global.Config.PlayMovie_MatchGameName = MatchGameNameCheckBox.Checked; + Global.Config.PlayMovie_MatchHash = MatchHashCheckBox.Checked; ScanFiles(); PreHighlightMovie(); }