Skip to content

Commit bcf5189

Browse files
Update PerformanceCalculatorGUI/PerformanceCalculatorGame.cs
Co-authored-by: StanR <8269193+stanriders@users.noreply.github.com>
1 parent 8ec1304 commit bcf5189

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

PerformanceCalculatorGUI/PerformanceCalculatorGame.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,16 @@ public override void SetHost(GameHost host)
8282

8383
foreach (var handler in host.AvailableInputHandlers)
8484
{
85-
if (handler is MouseHandler mouseHandler)
85+
if (handler is MouseHandler mouseHandler && mouseHandler.UseRelativeMode.Value)
8686
{
8787
mouseHandler.UseRelativeMode.Value = false;
8888
}
89-
}
9089

91-
var tabletInputHandler = host.AvailableInputHandlers.FirstOrDefault(x => x is OpenTabletDriverHandler && x.IsActive);
90+
if (handler is OpenTabletDriverHandler tabletInputHandler && tabletInputHandler.IsActive)
91+
{
92+
tabletInputHandler.Enabled.Value = false;
93+
}
94+
}
9295

9396
if (tabletInputHandler != null)
9497
{

0 commit comments

Comments
 (0)