mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Formatting
This commit is contained in:
parent
caf2e3b2ae
commit
47b9b78634
@ -94,22 +94,23 @@ namespace Artemis.Managers
|
||||
|
||||
if (!wasNull)
|
||||
ReleaseActiveKeyboard();
|
||||
bool asynchEnable = false;
|
||||
var asynchEnable = false;
|
||||
if (keyboardProvider.CanEnable())
|
||||
{
|
||||
FinishEnableKeyboard(keyboardProvider, oldKeyboard);
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 1; i <= 10; i++)
|
||||
for (var i = 1; i <= 10; i++)
|
||||
{
|
||||
var thread = new Thread(
|
||||
() =>
|
||||
var thread = new Thread(() =>
|
||||
{
|
||||
Thread.Sleep(500*i);
|
||||
asynchEnable = keyboardProvider.CanEnable();
|
||||
});
|
||||
|
||||
_logger.Warn("Failed enabling keyboard: {0}, re-attempt {1} of 10", keyboardProvider.Name, i);
|
||||
|
||||
thread.Start();
|
||||
if (asynchEnable)
|
||||
break;
|
||||
@ -128,7 +129,6 @@ namespace Artemis.Managers
|
||||
}
|
||||
FinishEnableKeyboard(keyboardProvider, oldKeyboard);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user