GameInfo - simplify
This commit is contained in:
parent
4e7e314a33
commit
ac61701aa3
|
@ -109,12 +109,12 @@ namespace BizHawk.Emulation.Common
|
||||||
/// <returns> The boolean value from the database if present, otherwise the given default value</returns>
|
/// <returns> The boolean value from the database if present, otherwise the given default value</returns>
|
||||||
public bool GetBool(string parameter, bool defaultVal)
|
public bool GetBool(string parameter, bool defaultVal)
|
||||||
{
|
{
|
||||||
if (OptionPresent(parameter) && OptionValue(parameter) == "true")
|
if (OptionValue(parameter) == "true")
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (OptionPresent(parameter) && OptionValue(parameter) == "false")
|
if (OptionValue(parameter) == "false")
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -130,7 +130,7 @@ namespace BizHawk.Emulation.Common
|
||||||
/// <returns> The integer value from the database if present, otherwise the given default value</returns>
|
/// <returns> The integer value from the database if present, otherwise the given default value</returns>
|
||||||
public int GetInt(string parameter, int defaultVal)
|
public int GetInt(string parameter, int defaultVal)
|
||||||
{
|
{
|
||||||
if (OptionPresent(parameter))
|
if (Options.ContainsKey(parameter))
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue