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
This commit is contained in:
parent
1c72c144af
commit
97ba81c95d
|
@ -166,6 +166,7 @@ namespace BizHawk.MultiClient
|
||||||
|
|
||||||
public void AddCheat(Cheat c)
|
public void AddCheat(Cheat c)
|
||||||
{
|
{
|
||||||
|
Changes();
|
||||||
cheatList.Add(c);
|
cheatList.Add(c);
|
||||||
DisplayCheatsList();
|
DisplayCheatsList();
|
||||||
CheatListView.Refresh();
|
CheatListView.Refresh();
|
||||||
|
@ -409,6 +410,8 @@ namespace BizHawk.MultiClient
|
||||||
private bool SaveCheatFile(string path)
|
private bool SaveCheatFile(string path)
|
||||||
{
|
{
|
||||||
var file = new FileInfo(path);
|
var file = new FileInfo(path);
|
||||||
|
if (!file.Directory.Exists)
|
||||||
|
file.Directory.Create();
|
||||||
|
|
||||||
using (StreamWriter sw = new StreamWriter(path))
|
using (StreamWriter sw = new StreamWriter(path))
|
||||||
{
|
{
|
||||||
|
@ -529,7 +532,7 @@ namespace BizHawk.MultiClient
|
||||||
break;
|
break;
|
||||||
case "SFX":
|
case "SFX":
|
||||||
case "PCE":
|
case "PCE":
|
||||||
path = PathManager.MakeAbsolutePath(Global.Config.PathPCECheats, "GB");
|
path = PathManager.MakeAbsolutePath(Global.Config.PathPCECheats, "PCE");
|
||||||
break;
|
break;
|
||||||
case "GB":
|
case "GB":
|
||||||
path = PathManager.MakeAbsolutePath(Global.Config.PathGBCheats, "GB");
|
path = PathManager.MakeAbsolutePath(Global.Config.PathGBCheats, "GB");
|
||||||
|
|
Loading…
Reference in New Issue