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

View File

@ -48,8 +48,7 @@ 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)
{
var fullmsg = String.Format(
@ -57,7 +56,6 @@ namespace BizHawk.Client.Common
_showWarning(fullmsg);
}
}
}
public string GetFirmwarePath(string sysID, string firmwareID, bool required, string msg = null)
{

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,12 +19,10 @@ namespace BizHawk.Client.Common
{
return true;
}
else
{
return System.Split('_').Contains(systemID);
}
}
}
[Newtonsoft.Json.JsonObject]
public class PathEntryCollection : IEnumerable<PathEntry>
@ -75,12 +71,10 @@ 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
string systempath = PathManager.RemoveInvalidFileSystemChars(system) + "_INTERIM";
string systemdisp = system + " (INTERIM)";
// 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[]
{
@ -89,12 +83,11 @@ namespace BizHawk.Client.Common
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 },
new PathEntry { System = system, SystemDisplayName=systemdisp, Type = "Cheats", Path = Path.Combine(".", "Cheats"), Ordinal = 5 }
});
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" }