Save autoload recent rom bool to config

This commit is contained in:
andres.delikat 2011-01-18 01:55:01 +00:00
parent 3fd62d4dcf
commit 7620d08ec3
3 changed files with 8 additions and 6 deletions

View File

@ -5,6 +5,7 @@
// General Client Settings // General Client Settings
public bool SoundEnabled = true; public bool SoundEnabled = true;
public string LastRomPath = "."; public string LastRomPath = ".";
public bool AutoLoadMostRecentRom = false; //TODO: eventually make a class or struct for all the auto-loads, which will include recent roms, movies, etc, as well as autoloading any modeless dialog
// Client Hotkey Bindings // Client Hotkey Bindings
public string HardResetBinding = "LeftShift+Tab"; public string HardResetBinding = "LeftShift+Tab";

View File

@ -15,7 +15,7 @@ namespace BizHawk.MultiClient
private Control renderTarget; private Control renderTarget;
private RetainedViewportPanel retainedPanel; private RetainedViewportPanel retainedPanel;
private RecentFiles RecentRoms = new RecentFiles(8); private RecentFiles RecentRoms = new RecentFiles(8);
private bool AutoLoadMostRecentRom = false; //TODO: eventually make a class or struct for all the auto-loads, which will include recent roms, movies, etc, as well as autoloading any modeless dialog
private int SaveSlot = 0; //Saveslot sytem private int SaveSlot = 0; //Saveslot sytem
@ -593,15 +593,15 @@ namespace BizHawk.MultiClient
private void UpdateAutoLoadRecentRom() private void UpdateAutoLoadRecentRom()
{ {
if (AutoLoadMostRecentRom == true) if (Global.Config.AutoLoadMostRecentRom == true)
{ {
autoloadMostRecentToolStripMenuItem.Checked = false; autoloadMostRecentToolStripMenuItem.Checked = false;
AutoLoadMostRecentRom = false; Global.Config.AutoLoadMostRecentRom = false;
} }
else else
{ {
autoloadMostRecentToolStripMenuItem.Checked = true; autoloadMostRecentToolStripMenuItem.Checked = true;
AutoLoadMostRecentRom = true; Global.Config.AutoLoadMostRecentRom = true;
} }
} }
@ -672,7 +672,7 @@ namespace BizHawk.MultiClient
loadstate0toolStripMenuItem.Enabled = true; loadstate0toolStripMenuItem.Enabled = true;
} }
if (AutoLoadMostRecentRom == true) if (Global.Config.AutoLoadMostRecentRom == true)
autoloadMostRecentToolStripMenuItem.Checked = true; autoloadMostRecentToolStripMenuItem.Checked = true;
else else
autoloadMostRecentToolStripMenuItem.Checked = false; autoloadMostRecentToolStripMenuItem.Checked = false;
@ -710,7 +710,7 @@ namespace BizHawk.MultiClient
var auto = new ToolStripMenuItem(); var auto = new ToolStripMenuItem();
auto.Text = "&Autoload Most Recent"; auto.Text = "&Autoload Most Recent";
auto.Click += (o, ev) => UpdateAutoLoadRecentRom(); auto.Click += (o, ev) => UpdateAutoLoadRecentRom();
if (AutoLoadMostRecentRom == true) if (Global.Config.AutoLoadMostRecentRom == true)
auto.Checked = true; auto.Checked = true;
else else
auto.Checked = false; auto.Checked = false;

View File

@ -1,5 +1,6 @@
SoundEnabled True SoundEnabled True
LastRomPath D:\TAS\adelikatTAS\Archive LastRomPath D:\TAS\adelikatTAS\Archive
AutoLoadMostRecentRom True
HardResetBinding LeftShift+Tab HardResetBinding LeftShift+Tab
FastForwardBinding J1 B6 FastForwardBinding J1 B6
RewindBinding J1 B5 RewindBinding J1 B5