GameInfo - simplify

This commit is contained in:
adelikat 2020-06-12 12:34:01 -05:00
parent 4e7e314a33
commit ac61701aa3
1 changed files with 3 additions and 3 deletions

View File

@ -109,12 +109,12 @@ namespace BizHawk.Emulation.Common
/// <returns> The boolean value from the database if present, otherwise the given default value</returns>
public bool GetBool(string parameter, bool defaultVal)
{
if (OptionPresent(parameter) && OptionValue(parameter) == "true")
if (OptionValue(parameter) == "true")
{
return true;
}
if (OptionPresent(parameter) && OptionValue(parameter) == "false")
if (OptionValue(parameter) == "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>
public int GetInt(string parameter, int defaultVal)
{
if (OptionPresent(parameter))
if (Options.ContainsKey(parameter))
{
try
{