Some useless cleanup

This commit is contained in:
adelikat 2014-07-03 18:17:09 +00:00
parent e058e08c35
commit a5fadb8e0b
5 changed files with 28 additions and 39 deletions

View File

@ -244,10 +244,8 @@ namespace BizHawk.Client.Common
var a = (Global.Emulator.Frame - _buttonStarts[button]) % (On + Off);
return a < On && _buttons[button];
}
else
{
return _buttons[button];
}
return _buttons[button];
}
public float GetFloat(string name) { throw new NotImplementedException(); }

View File

@ -48,14 +48,12 @@ namespace BizHawk.Client.Common
"Couldn't find required firmware \"{0}:{1}\". This is fatal{2}", sysID, firmwareID, msg != null ? ": " + msg : ".");
throw new Exception(fullmsg);
}
else
if (msg != null)
{
if (msg != null)
{
var fullmsg = String.Format(
"Couldn't find firmware \"{0}:{1}\". Will attempt to continue: {2}", sysID, firmwareID, msg);
_showWarning(fullmsg);
}
var fullmsg = String.Format(
"Couldn't find firmware \"{0}:{1}\". Will attempt to continue: {2}", sysID, firmwareID, msg);
_showWarning(fullmsg);
}
}

View File

@ -15,16 +15,16 @@ namespace BizHawk.Client.Common
public ContextRef CreateGLContext()
{
var ret = new ContextRef()
var ret = new ContextRef
{
gl = new BizHawk.Bizware.BizwareGL.Drivers.OpenTK.IGL_TK()
gl = new Bizware.BizwareGL.Drivers.OpenTK.IGL_TK()
};
return ret;
}
public ContextRef GetContextForGraphicsControl(GraphicsControl gc)
{
return new ContextRef()
return new ContextRef
{
gc = gc
};
@ -35,7 +35,7 @@ namespace BizHawk.Client.Common
/// </summary>
public ContextRef GetContextForIGL(IGL gl)
{
return new ContextRef()
return new ContextRef
{
gl = gl
};

View File

@ -7,8 +7,6 @@ namespace BizHawk.Client.Common
{
public class PathEntry
{
public PathEntry() { }
public string SystemDisplayName;
public string Type;
public string Path;
@ -21,10 +19,8 @@ namespace BizHawk.Client.Common
{
return true;
}
else
{
return System.Split('_').Contains(systemID);
}
return System.Split('_').Contains(systemID);
}
}
@ -75,25 +71,22 @@ namespace BizHawk.Client.Common
// we have the system, but not the type. don't attempt to add an unknown type
return null;
}
else
// we don't have anything for the system in question. add a set of stock paths
var systempath = PathManager.RemoveInvalidFileSystemChars(system) + "_INTERIM";
var systemdisp = system + " (INTERIM)";
Paths.AddRange(new[]
{
// we don't have anything for the system in question. add a set of stock paths
new PathEntry { System = system, SystemDisplayName=systemdisp, Type = "Base", Path= Path.Combine(".", systempath), Ordinal = 0 },
new PathEntry { System = system, SystemDisplayName=systemdisp, Type = "ROM", Path = ".", Ordinal = 1 },
new PathEntry { System = system, SystemDisplayName=systemdisp, Type = "Savestates", Path= Path.Combine(".", "State"), Ordinal = 2 },
new PathEntry { System = system, SystemDisplayName=systemdisp, Type = "Save RAM", Path = Path.Combine(".", "SaveRAM"), Ordinal = 3 },
new PathEntry { System = system, SystemDisplayName=systemdisp, Type = "Screenshots", Path = Path.Combine(".", "Screenshots"), Ordinal = 4 },
new PathEntry { System = system, SystemDisplayName=systemdisp, Type = "Cheats", Path = Path.Combine(".", "Cheats"), Ordinal = 5 }
});
string systempath = PathManager.RemoveInvalidFileSystemChars(system) + "_INTERIM";
string systemdisp = system + " (INTERIM)";
Paths.AddRange(new[]
{
new PathEntry { System = system, SystemDisplayName=systemdisp, Type = "Base", Path= Path.Combine(".", systempath), Ordinal = 0 },
new PathEntry { System = system, SystemDisplayName=systemdisp, Type = "ROM", Path = ".", Ordinal = 1 },
new PathEntry { System = system, SystemDisplayName=systemdisp, Type = "Savestates", Path= Path.Combine(".", "State"), Ordinal = 2 },
new PathEntry { System = system, SystemDisplayName=systemdisp, Type = "Save RAM", Path = Path.Combine(".", "SaveRAM"), Ordinal = 3 },
new PathEntry { System = system, SystemDisplayName=systemdisp, Type = "Screenshots", Path = Path.Combine(".", "Screenshots"), Ordinal = 4 },
new PathEntry { System = system, SystemDisplayName=systemdisp, Type = "Cheats", Path = Path.Combine(".", "Cheats"), Ordinal = 5 },
});
return this[system, type];
}
return this[system, type];
}
public void ResolveWithDefaults()

View File

@ -52,7 +52,7 @@ namespace BizHawk.Client.Common
get
{
// TODO
return new Dictionary<string, string>()
return new Dictionary<string, string>
{
{ "A", "A" },
{ "B", "B" }