move saveslot to config
This commit is contained in:
parent
7eb2eb0071
commit
b587ecffd9
|
@ -125,12 +125,13 @@
|
||||||
public bool EnableBackupMovies = true;
|
public bool EnableBackupMovies = true;
|
||||||
public bool HotkeyConfigAutoTab = true;
|
public bool HotkeyConfigAutoTab = true;
|
||||||
public bool InputConfigAutoTab = true;
|
public bool InputConfigAutoTab = true;
|
||||||
public bool ShowLogWindow = false;
|
public bool ShowLogWindow = false;
|
||||||
public bool BackupSavestates = true;
|
public bool BackupSavestates = true;
|
||||||
public bool SaveScreenshotWithStates = true;
|
public bool SaveScreenshotWithStates = true;
|
||||||
public int AutofireOn = 1;
|
public int AutofireOn = 1;
|
||||||
public int AutofireOff = 1;
|
public int AutofireOff = 1;
|
||||||
public bool AutofireLagFrames = true;
|
public bool AutofireLagFrames = true;
|
||||||
|
public int SaveSlot = 0; //currently selected savestate slot
|
||||||
|
|
||||||
// Run-Control settings
|
// Run-Control settings
|
||||||
public int FrameProgressDelayMs = 500; //how long until a frame advance hold turns into a frame progress?
|
public int FrameProgressDelayMs = 500; //how long until a frame advance hold turns into a frame progress?
|
||||||
|
|
|
@ -180,70 +180,70 @@ namespace BizHawk.MultiClient
|
||||||
|
|
||||||
private void selectSlot1ToolStripMenuItem_Click(object sender, EventArgs e)
|
private void selectSlot1ToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
SaveSlot = 1;
|
Global.Config.SaveSlot = 1;
|
||||||
UpdateStatusSlots();
|
UpdateStatusSlots();
|
||||||
SaveSlotSelectedMessage();
|
SaveSlotSelectedMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void selectSlot2ToolStripMenuItem_Click(object sender, EventArgs e)
|
private void selectSlot2ToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
SaveSlot = 2;
|
Global.Config.SaveSlot = 2;
|
||||||
UpdateStatusSlots();
|
UpdateStatusSlots();
|
||||||
SaveSlotSelectedMessage();
|
SaveSlotSelectedMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void selectSlot3ToolStripMenuItem_Click(object sender, EventArgs e)
|
private void selectSlot3ToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
SaveSlot = 3;
|
Global.Config.SaveSlot = 3;
|
||||||
UpdateStatusSlots();
|
UpdateStatusSlots();
|
||||||
SaveSlotSelectedMessage();
|
SaveSlotSelectedMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void selectSlot4ToolStripMenuItem_Click(object sender, EventArgs e)
|
private void selectSlot4ToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
SaveSlot = 4;
|
Global.Config.SaveSlot = 4;
|
||||||
UpdateStatusSlots();
|
UpdateStatusSlots();
|
||||||
SaveSlotSelectedMessage();
|
SaveSlotSelectedMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void selectSlot5ToolStripMenuItem_Click(object sender, EventArgs e)
|
private void selectSlot5ToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
SaveSlot = 5;
|
Global.Config.SaveSlot = 5;
|
||||||
UpdateStatusSlots();
|
UpdateStatusSlots();
|
||||||
SaveSlotSelectedMessage();
|
SaveSlotSelectedMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void selectSlot6ToolStripMenuItem_Click(object sender, EventArgs e)
|
private void selectSlot6ToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
SaveSlot = 6;
|
Global.Config.SaveSlot = 6;
|
||||||
UpdateStatusSlots();
|
UpdateStatusSlots();
|
||||||
SaveSlotSelectedMessage();
|
SaveSlotSelectedMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void selectSlot7ToolStripMenuItem_Click(object sender, EventArgs e)
|
private void selectSlot7ToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
SaveSlot = 7;
|
Global.Config.SaveSlot = 7;
|
||||||
UpdateStatusSlots();
|
UpdateStatusSlots();
|
||||||
SaveSlotSelectedMessage();
|
SaveSlotSelectedMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void selectSlot8ToolStripMenuItem_Click(object sender, EventArgs e)
|
private void selectSlot8ToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
SaveSlot = 8;
|
Global.Config.SaveSlot = 8;
|
||||||
UpdateStatusSlots();
|
UpdateStatusSlots();
|
||||||
SaveSlotSelectedMessage();
|
SaveSlotSelectedMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void selectSlot9ToolStripMenuItem_Click(object sender, EventArgs e)
|
private void selectSlot9ToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
SaveSlot = 9;
|
Global.Config.SaveSlot = 9;
|
||||||
UpdateStatusSlots();
|
UpdateStatusSlots();
|
||||||
SaveSlotSelectedMessage();
|
SaveSlotSelectedMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void selectSlot10ToolStripMenuItem_Click(object sender, EventArgs e)
|
private void selectSlot10ToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
SaveSlot = 0;
|
Global.Config.SaveSlot = 0;
|
||||||
UpdateStatusSlots();
|
UpdateStatusSlots();
|
||||||
SaveSlotSelectedMessage();
|
SaveSlotSelectedMessage();
|
||||||
}
|
}
|
||||||
|
@ -260,12 +260,12 @@ namespace BizHawk.MultiClient
|
||||||
|
|
||||||
private void saveToCurrentSlotToolStripMenuItem_Click(object sender, EventArgs e)
|
private void saveToCurrentSlotToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
SaveState("QuickSave" + SaveSlot.ToString());
|
SaveState("QuickSave" + Global.Config.SaveSlot.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void loadCurrentSlotToolStripMenuItem_Click(object sender, EventArgs e)
|
private void loadCurrentSlotToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
LoadState("QuickSave" + SaveSlot.ToString());
|
LoadState("QuickSave" + Global.Config.SaveSlot.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void closeROMToolStripMenuItem_Click(object sender, EventArgs e)
|
private void closeROMToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
@ -875,20 +875,20 @@ namespace BizHawk.MultiClient
|
||||||
else
|
else
|
||||||
contextMenuStrip1.Items[7].Enabled = true;
|
contextMenuStrip1.Items[7].Enabled = true;
|
||||||
|
|
||||||
string path = PathManager.SaveStatePrefix(Global.Game) + "." + "QuickSave" + SaveSlot + ".State.bak";
|
string path = PathManager.SaveStatePrefix(Global.Game) + "." + "QuickSave" + Global.Config.SaveSlot + ".State.bak";
|
||||||
var file = new FileInfo(path);
|
var file = new FileInfo(path);
|
||||||
if (file.Exists == true)
|
if (file.Exists == true)
|
||||||
{
|
{
|
||||||
if (StateSlots.IsRedo(SaveSlot))
|
if (StateSlots.IsRedo(Global.Config.SaveSlot))
|
||||||
{
|
{
|
||||||
contextMenuStrip1.Items[13].Enabled = true;
|
contextMenuStrip1.Items[13].Enabled = true;
|
||||||
contextMenuStrip1.Items[13].Text = "Redo Save to slot " + SaveSlot.ToString();
|
contextMenuStrip1.Items[13].Text = "Redo Save to slot " + Global.Config.SaveSlot.ToString();
|
||||||
contextMenuStrip1.Items[13].Image = BizHawk.MultiClient.Properties.Resources.redo;
|
contextMenuStrip1.Items[13].Image = BizHawk.MultiClient.Properties.Resources.redo;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
contextMenuStrip1.Items[13].Enabled = true;
|
contextMenuStrip1.Items[13].Enabled = true;
|
||||||
contextMenuStrip1.Items[13].Text = "Undo Save to slot " + SaveSlot.ToString();
|
contextMenuStrip1.Items[13].Text = "Undo Save to slot " + Global.Config.SaveSlot.ToString();
|
||||||
contextMenuStrip1.Items[13].Image = BizHawk.MultiClient.Properties.Resources.undo;
|
contextMenuStrip1.Items[13].Image = BizHawk.MultiClient.Properties.Resources.undo;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1245,7 +1245,7 @@ namespace BizHawk.MultiClient
|
||||||
selectSlot9ToolStripMenuItem.Checked = false;
|
selectSlot9ToolStripMenuItem.Checked = false;
|
||||||
selectSlot1ToolStripMenuItem.Checked = false;
|
selectSlot1ToolStripMenuItem.Checked = false;
|
||||||
|
|
||||||
switch (SaveSlot)
|
switch (Global.Config.SaveSlot)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
selectSlot10ToolStripMenuItem.Checked = true;
|
selectSlot10ToolStripMenuItem.Checked = true;
|
||||||
|
@ -1325,9 +1325,9 @@ namespace BizHawk.MultiClient
|
||||||
|
|
||||||
private void undoSavestateToolStripMenuItem_Click(object sender, EventArgs e)
|
private void undoSavestateToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
string path = PathManager.SaveStatePrefix(Global.Game) + "." + "QuickSave" + SaveSlot + ".State";
|
string path = PathManager.SaveStatePrefix(Global.Game) + "." + "QuickSave" + Global.Config.SaveSlot + ".State";
|
||||||
SwapBackupSavestate(path);
|
SwapBackupSavestate(path);
|
||||||
Global.RenderPanel.AddMessage("Save slot " + SaveSlot.ToString() + " restored.");
|
Global.RenderPanel.AddMessage("Save slot " + Global.Config.SaveSlot.ToString() + " restored.");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void FreezeStatus_Click(object sender, EventArgs e)
|
private void FreezeStatus_Click(object sender, EventArgs e)
|
||||||
|
|
|
@ -32,9 +32,6 @@ namespace BizHawk.MultiClient
|
||||||
//avi/wav state
|
//avi/wav state
|
||||||
AviWriter CurrAviWriter = null;
|
AviWriter CurrAviWriter = null;
|
||||||
|
|
||||||
//the currently selected savestate slot
|
|
||||||
private int SaveSlot = 0;
|
|
||||||
|
|
||||||
//runloop control
|
//runloop control
|
||||||
bool exit;
|
bool exit;
|
||||||
bool runloop_frameProgress;
|
bool runloop_frameProgress;
|
||||||
|
@ -1210,7 +1207,7 @@ namespace BizHawk.MultiClient
|
||||||
|
|
||||||
void OnSelectSlot(int num)
|
void OnSelectSlot(int num)
|
||||||
{
|
{
|
||||||
SaveSlot = num;
|
Global.Config.SaveSlot = num;
|
||||||
SaveSlotSelectedMessage();
|
SaveSlotSelectedMessage();
|
||||||
UpdateStatusSlots();
|
UpdateStatusSlots();
|
||||||
}
|
}
|
||||||
|
@ -1325,12 +1322,12 @@ namespace BizHawk.MultiClient
|
||||||
|
|
||||||
case "Quick Save State":
|
case "Quick Save State":
|
||||||
if (!IsNullEmulator())
|
if (!IsNullEmulator())
|
||||||
SaveState("QuickSave" + SaveSlot.ToString());
|
SaveState("QuickSave" + Global.Config.SaveSlot.ToString());
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "Quick Load State":
|
case "Quick Load State":
|
||||||
if (!IsNullEmulator())
|
if (!IsNullEmulator())
|
||||||
LoadState("QuickSave" + SaveSlot.ToString());
|
LoadState("QuickSave" + Global.Config.SaveSlot.ToString());
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "Unthrottle":
|
case "Unthrottle":
|
||||||
|
@ -1847,7 +1844,7 @@ namespace BizHawk.MultiClient
|
||||||
|
|
||||||
private void SaveSlotSelectedMessage()
|
private void SaveSlotSelectedMessage()
|
||||||
{
|
{
|
||||||
Global.RenderPanel.AddMessage("Slot " + SaveSlot + " selected.");
|
Global.RenderPanel.AddMessage("Slot " + Global.Config.SaveSlot + " selected.");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateAutoLoadRecentRom()
|
private void UpdateAutoLoadRecentRom()
|
||||||
|
@ -2172,17 +2169,22 @@ namespace BizHawk.MultiClient
|
||||||
|
|
||||||
private void PreviousSlot()
|
private void PreviousSlot()
|
||||||
{
|
{
|
||||||
if (SaveSlot == 0) SaveSlot = 9; //Wrap to end of slot list
|
if (Global.Config.SaveSlot == 0)
|
||||||
else if (SaveSlot > 9) SaveSlot = 9; //Meh, just in case
|
Global.Config.SaveSlot = 9; //Wrap to end of slot list
|
||||||
else SaveSlot--;
|
else if (Global.Config.SaveSlot > 9)
|
||||||
|
Global.Config.SaveSlot = 9; //Meh, just in case
|
||||||
|
else Global.Config.SaveSlot--;
|
||||||
SaveSlotSelectedMessage();
|
SaveSlotSelectedMessage();
|
||||||
UpdateStatusSlots();
|
UpdateStatusSlots();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void NextSlot()
|
private void NextSlot()
|
||||||
{
|
{
|
||||||
if (SaveSlot >= 9) SaveSlot = 0; //Wrap to beginning of slot list
|
if (Global.Config.SaveSlot >= 9)
|
||||||
else SaveSlot++;
|
Global.Config.SaveSlot = 0; //Wrap to beginning of slot list
|
||||||
|
else if (Global.Config.SaveSlot < 0)
|
||||||
|
Global.Config.SaveSlot = 0; //Meh, just in case
|
||||||
|
else Global.Config.SaveSlot++;
|
||||||
SaveSlotSelectedMessage();
|
SaveSlotSelectedMessage();
|
||||||
UpdateStatusSlots();
|
UpdateStatusSlots();
|
||||||
}
|
}
|
||||||
|
@ -2312,16 +2314,16 @@ namespace BizHawk.MultiClient
|
||||||
StatusSlot9.BackColor = SystemColors.Control;
|
StatusSlot9.BackColor = SystemColors.Control;
|
||||||
StatusSlot10.BackColor = SystemColors.Control;
|
StatusSlot10.BackColor = SystemColors.Control;
|
||||||
|
|
||||||
if (SaveSlot == 0) StatusSlot10.BackColor = SystemColors.ControlLightLight;
|
if (Global.Config.SaveSlot == 0) StatusSlot10.BackColor = SystemColors.ControlLightLight;
|
||||||
if (SaveSlot == 1) StatusSlot1.BackColor = SystemColors.ControlLightLight;
|
if (Global.Config.SaveSlot == 1) StatusSlot1.BackColor = SystemColors.ControlLightLight;
|
||||||
if (SaveSlot == 2) StatusSlot2.BackColor = SystemColors.ControlLightLight;
|
if (Global.Config.SaveSlot == 2) StatusSlot2.BackColor = SystemColors.ControlLightLight;
|
||||||
if (SaveSlot == 3) StatusSlot3.BackColor = SystemColors.ControlLightLight;
|
if (Global.Config.SaveSlot == 3) StatusSlot3.BackColor = SystemColors.ControlLightLight;
|
||||||
if (SaveSlot == 4) StatusSlot4.BackColor = SystemColors.ControlLightLight;
|
if (Global.Config.SaveSlot == 4) StatusSlot4.BackColor = SystemColors.ControlLightLight;
|
||||||
if (SaveSlot == 5) StatusSlot5.BackColor = SystemColors.ControlLightLight;
|
if (Global.Config.SaveSlot == 5) StatusSlot5.BackColor = SystemColors.ControlLightLight;
|
||||||
if (SaveSlot == 6) StatusSlot6.BackColor = SystemColors.ControlLightLight;
|
if (Global.Config.SaveSlot == 6) StatusSlot6.BackColor = SystemColors.ControlLightLight;
|
||||||
if (SaveSlot == 7) StatusSlot7.BackColor = SystemColors.ControlLightLight;
|
if (Global.Config.SaveSlot == 7) StatusSlot7.BackColor = SystemColors.ControlLightLight;
|
||||||
if (SaveSlot == 8) StatusSlot8.BackColor = SystemColors.ControlLightLight;
|
if (Global.Config.SaveSlot == 8) StatusSlot8.BackColor = SystemColors.ControlLightLight;
|
||||||
if (SaveSlot == 9) StatusSlot9.BackColor = SystemColors.ControlLightLight;
|
if (Global.Config.SaveSlot == 9) StatusSlot9.BackColor = SystemColors.ControlLightLight;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RecordAVI()
|
public void RecordAVI()
|
||||||
|
@ -2400,7 +2402,7 @@ namespace BizHawk.MultiClient
|
||||||
temp.CopyTo(path);
|
temp.CopyTo(path);
|
||||||
temp.Delete();
|
temp.Delete();
|
||||||
|
|
||||||
StateSlots.ToggleRedo(SaveSlot);
|
StateSlots.ToggleRedo(Global.Config.SaveSlot);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue