From 97ba81c95d3f89b5e879befa1ac7eb7288a20cfe Mon Sep 17 00:00:00 2001 From: "andres.delikat" Date: Mon, 1 Aug 2011 23:42:09 +0000 Subject: [PATCH] Cheats - If cheat directory doesn't exist when saving, create it. Fix bug where PCE cheats were saved in GB folder, if adding a cheat from another dialog - flag Changes --- BizHawk.MultiClient/tools/Cheats.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/BizHawk.MultiClient/tools/Cheats.cs b/BizHawk.MultiClient/tools/Cheats.cs index 1a217c989c..a913195dce 100644 --- a/BizHawk.MultiClient/tools/Cheats.cs +++ b/BizHawk.MultiClient/tools/Cheats.cs @@ -166,6 +166,7 @@ namespace BizHawk.MultiClient public void AddCheat(Cheat c) { + Changes(); cheatList.Add(c); DisplayCheatsList(); CheatListView.Refresh(); @@ -409,6 +410,8 @@ namespace BizHawk.MultiClient private bool SaveCheatFile(string path) { var file = new FileInfo(path); + if (!file.Directory.Exists) + file.Directory.Create(); using (StreamWriter sw = new StreamWriter(path)) { @@ -529,7 +532,7 @@ namespace BizHawk.MultiClient break; case "SFX": case "PCE": - path = PathManager.MakeAbsolutePath(Global.Config.PathPCECheats, "GB"); + path = PathManager.MakeAbsolutePath(Global.Config.PathPCECheats, "PCE"); break; case "GB": path = PathManager.MakeAbsolutePath(Global.Config.PathGBCheats, "GB");