Skip to content

Commit

Permalink
Merge pull request #2011 from xQwexx/fix/uniwill
Browse files Browse the repository at this point in the history
Uniwill replace try catch
  • Loading branch information
diogotr7 authored May 17, 2020
2 parents a2b206a + 631febc commit 995028c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Project-Aurora/Project-Aurora/Devices/Uniwill/UniwillDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,14 @@ private void ChoiceGamingCenter()

private GAMECENTERTYPE CheckGC()
{
try
int? Control = (int?)Registry.GetValue(keyName, "AuroraSwitch", null);

if(Control.HasValue)
{
int Control = (int)Registry.GetValue(keyName, "AuroraSwitch", null);
GamingCenterType = GAMECENTERTYPE.GAMINGTCENTER;
SwitchOn = Control;
SwitchOn = Control.Value;
}
catch
else
{
GamingCenterType = GAMECENTERTYPE.NONE;
SwitchOn = 0;
Expand Down Expand Up @@ -148,7 +149,7 @@ public bool Initialize()
}
catch
{
Debug.WriteLine("Uniwill device error!");
Global.logger.Error("Uniwill device error!");
}
// Mark Initialized = FALSE
isInitialized = false;
Expand Down

0 comments on commit 995028c

Please sign in to comment.