Enable the Movie menu even with no core loaded

- resolves #3570
This commit is contained in:
Morilli 2024-06-23 04:24:17 +02:00
parent 3841d88268
commit 6cbf06d444
2 changed files with 13 additions and 8 deletions

View File

@ -373,6 +373,7 @@ namespace BizHawk.Client.EmuHawk
this.ShowMenuContextMenuSeparator = new BizHawk.WinForms.Controls.ToolStripSeparatorEx();
this.ShowMenuContextMenuItem = new BizHawk.WinForms.Controls.ToolStripMenuItemEx();
this.timerMouseIdle = new System.Windows.Forms.Timer(this.components);
this.toolStripSeparator25 = new System.Windows.Forms.ToolStripSeparator();
this.MainformMenu.SuspendLayout();
this.MainStatusBar.SuspendLayout();
this.MainFormContextMenu.SuspendLayout();
@ -724,10 +725,11 @@ namespace BizHawk.Client.EmuHawk
this.PlayMovieMenuItem,
this.StopMovieMenuItem,
this.PlayFromBeginningMenuItem,
this.ImportMoviesMenuItem,
this.SaveMovieMenuItem,
this.SaveMovieAsMenuItem,
this.StopMovieWithoutSavingMenuItem,
this.toolStripSeparator25,
this.ImportMoviesMenuItem,
this.toolStripSeparator14,
this.AutomaticallyBackupMoviesMenuItem,
this.FullMovieLoadstatesMenuItem,
@ -2377,6 +2379,11 @@ namespace BizHawk.Client.EmuHawk
this.timerMouseIdle.Interval = 2000;
this.timerMouseIdle.Tick += new System.EventHandler(this.TimerMouseIdle_Tick);
//
// toolStripSeparator25
//
this.toolStripSeparator25.Name = "toolStripSeparator25";
this.toolStripSeparator25.Size = new System.Drawing.Size(228, 6);
//
// MainForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@ -2759,5 +2766,6 @@ namespace BizHawk.Client.EmuHawk
private System.Windows.Forms.ToolStripMenuItem CaptureLuaMenuItem;
private ToolStripSeparatorEx toolStripSeparator24;
private ToolStripMenuItemEx AutosaveLastSlotMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator25;
}
}

View File

@ -100,9 +100,7 @@ namespace BizHawk.Client.EmuHawk
OpenRomMenuItem.ShortcutKeyDisplayString = Config.HotkeyBindings["Open ROM"];
CloseRomMenuItem.ShortcutKeyDisplayString = Config.HotkeyBindings["Close ROM"];
MovieSubMenu.Enabled =
CloseRomMenuItem.Enabled =
!Emulator.IsNull();
CloseRomMenuItem.Enabled = !Emulator.IsNull();
var hasSaveRam = Emulator.HasSaveRam();
bool needBold = hasSaveRam && Emulator.AsSaveRam().SaveRamModified;
@ -233,14 +231,13 @@ namespace BizHawk.Client.EmuHawk
SaveMovieMenuItem.ShortcutKeyDisplayString = Config.HotkeyBindings["Save Movie"];
PlayMovieMenuItem.Enabled
= ImportMoviesMenuItem.Enabled
= RecordMovieMenuItem.Enabled
= RecentMovieSubMenu.Enabled
= !Tools.IsLoaded<TAStudio>();
= !Emulator.IsNull() && !Tools.IsLoaded<TAStudio>();
// Record movie dialog should not be opened while in need of a reboot,
// Otherwise the wrong sync settings could be set for the recording movie and cause crashes
RecordMovieMenuItem.Enabled = !Tools.IsLoaded<TAStudio>()
&& !RebootStatusBarIcon.Visible;
RecordMovieMenuItem.Enabled &= !RebootStatusBarIcon.Visible;
PlayFromBeginningMenuItem.Enabled = MovieSession.Movie.IsActive() && !Tools.IsLoaded<TAStudio>();
}