diff --git a/BizHawk.Client.Common/BizHawk.Client.Common.csproj b/BizHawk.Client.Common/BizHawk.Client.Common.csproj
index 4a21b7b745..91230f65e9 100644
--- a/BizHawk.Client.Common/BizHawk.Client.Common.csproj
+++ b/BizHawk.Client.Common/BizHawk.Client.Common.csproj
@@ -127,7 +127,7 @@
-
+
diff --git a/BizHawk.Client.Common/SavestateManager.cs b/BizHawk.Client.Common/SaveSlotManager.cs
similarity index 59%
rename from BizHawk.Client.Common/SavestateManager.cs
rename to BizHawk.Client.Common/SaveSlotManager.cs
index d0e94b9e68..f3f9caea84 100644
--- a/BizHawk.Client.Common/SavestateManager.cs
+++ b/BizHawk.Client.Common/SaveSlotManager.cs
@@ -2,12 +2,12 @@
namespace BizHawk.Client.Common
{
- public class SavestateManager
+ public class SaveSlotManager
{
private readonly bool[] slots = new bool[10];
private readonly bool[] redo = new bool[10];
- public SavestateManager()
+ public SaveSlotManager()
{
Update();
}
@@ -16,17 +16,22 @@ namespace BizHawk.Client.Common
{
if (Global.Game == null || Global.Emulator == null)
{
- for (int x = 0; x < 10; x++)
- slots[x] = false;
+ for (int i = 0; i < 10; i++)
+ {
+ slots[i] = false;
+ }
return;
}
- for (int x = 0; x < 10; x++)
+ for (int i = 0; i < 10; i++)
{
- string path = PathManager.SaveStatePrefix(Global.Game) + "." + "QuickSave" + x + ".State";
- var file = new FileInfo(path);
+ var file = new FileInfo(
+ PathManager.SaveStatePrefix(Global.Game) + "." + "QuickSave" + i + ".State"
+ );
if (file.Directory != null && file.Directory.Exists == false)
+ {
file.Directory.Create();
- slots[x] = file.Exists;
+ }
+ slots[i] = file.Exists;
}
}
@@ -35,9 +40,9 @@ namespace BizHawk.Client.Common
get
{
Update();
- for (int x = 0; x < 10; x++)
+ for (int i = 0; i < 10; i++)
{
- if (slots[x]) return true;
+ if (slots[i]) return true;
}
return false;
}
@@ -45,7 +50,10 @@ namespace BizHawk.Client.Common
public bool HasSlot(int slot)
{
- if (slot < 0 || slot > 10) return false;
+ if (slot < 0 || slot > 10)
+ {
+ return false;
+ }
Update();
return slots[slot];
@@ -53,16 +61,18 @@ namespace BizHawk.Client.Common
public void ClearRedoList()
{
- for (int x = 0; x < 10; x++)
+ for (int i = 0; i < 10; i++)
{
- redo[x] = false;
+ redo[i] = false;
}
}
public void ToggleRedo(int slot)
{
if (slot < 0 || slot > 9)
+ {
return;
+ }
redo[slot] ^= true;
}
@@ -70,7 +80,9 @@ namespace BizHawk.Client.Common
public bool IsRedo(int slot)
{
if (slot < 0 || slot > 9)
+ {
return false;
+ }
return redo[slot];
}
diff --git a/BizHawk.MultiClient/MainForm.cs b/BizHawk.MultiClient/MainForm.cs
index 389e6f0272..5d1d910a38 100644
--- a/BizHawk.MultiClient/MainForm.cs
+++ b/BizHawk.MultiClient/MainForm.cs
@@ -46,7 +46,7 @@ namespace BizHawk.MultiClient
private Control renderTarget;
private RetainedViewportPanel retainedPanel;
- private readonly SavestateManager StateSlots = new SavestateManager();
+ private readonly SaveSlotManager StateSlots = new SaveSlotManager();
private readonly Dictionary SNES_prepared = new Dictionary();
//avi/wav state