tastudio macros: don't die from colons in paths when saving to file

disable macros menu items when there's no selection
This commit is contained in:
feos 2018-03-08 22:57:50 +03:00
parent 6580c2abef
commit e8103a1c53
2 changed files with 5 additions and 1 deletions

View File

@ -295,7 +295,7 @@ namespace BizHawk.Client.EmuHawk
{ {
return PathManager.MakeAbsolutePath(Path.Combine( return PathManager.MakeAbsolutePath(Path.Combine(
Global.Config.PathEntries["Global", "Macros"].Path, Global.Config.PathEntries["Global", "Macros"].Path,
Global.Game.Name), null); PathManager.FilesystemSafeName(Global.Game)), null);
} }
#endregion #endregion

View File

@ -25,6 +25,10 @@ namespace BizHawk.Client.EmuHawk
SaveTASMenuItem.Enabled = SaveTASMenuItem.Enabled =
!string.IsNullOrWhiteSpace(CurrentTasMovie.Filename) && !string.IsNullOrWhiteSpace(CurrentTasMovie.Filename) &&
(CurrentTasMovie.Filename != DefaultTasProjName()); (CurrentTasMovie.Filename != DefaultTasProjName());
saveSelectionToMacroToolStripMenuItem.Enabled =
placeMacroAtSelectionToolStripMenuItem.Enabled =
TasView.AnyRowsSelected;
} }
private void RecentSubMenu_DropDownOpened(object sender, EventArgs e) private void RecentSubMenu_DropDownOpened(object sender, EventArgs e)