Skip to content

Commit

Permalink
Removed the input stealing "fix" (already said to fixed by valve)
Browse files Browse the repository at this point in the history
  • Loading branch information
KimihikoAkayasaki committed Apr 1, 2023
1 parent 3537c43 commit df8f77a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
15 changes: 2 additions & 13 deletions Amethyst/Classes/Interfacing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -339,19 +339,8 @@ public static async Task<bool> SpawnEnabledTrackers()
// Notify that we're good now
AppTrackersSpawned = true;
AppTrackersInitialized = true;

/*
* Trackers are stealing input from controllers when first added,
* due to some weird wonky stuff happening and OpenVR not expecting them.
* We're gonna de-spawn them for 8 frames (100ms) and re-spawn after another
*/

await Task.Delay(100);
AppTrackersInitialized = false;
await Task.Delay(500);
AppTrackersInitialized = true;

return true;

return true; // We're done here!
}

public static async Task<(int Code, string Message)> TestServiceConnection()
Expand Down
8 changes: 8 additions & 0 deletions Amethyst/Pages/General.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -780,6 +780,8 @@ private void FreezeOnlyLowerToggle_Click(object sender, RoutedEventArgs e)

private async void ToggleTrackersButton_Checked(object sender, RoutedEventArgs e)
{
Logger.Info("Trackers initialization requested!");

// Don't check if setup's finished since we're gonna emulate a click rather than change the state only
ToggleTrackersButton.Content = Interfacing.LocalizedJsonString(
"/GeneralPage/Buttons/TrackersToggle/Disconnect");
Expand All @@ -803,6 +805,8 @@ private async void ToggleTrackersButton_Checked(object sender, RoutedEventArgs e
// Give up if failed
if (!Interfacing.ServiceEndpointFailure)
{
Logger.Info("Trying to initialize app trackers within the selected service...");

// Mark trackers as active
Interfacing.AppTrackersInitialized = true;

Expand All @@ -820,10 +824,14 @@ private async void ToggleTrackersButton_Checked(object sender, RoutedEventArgs e

private void ToggleTrackersButton_Unchecked(object sender, RoutedEventArgs e)
{
Logger.Info("Trackers removal requested!");

// Don't check if setup's finished since we're gonna emulate a click rather than change the state only
ToggleTrackersButton.Content = Interfacing.LocalizedJsonString(
"/GeneralPage/Buttons/TrackersToggle/Reconnect");

Logger.Info("Trying to shut app trackers within the selected service...");

// Mark trackers as inactive
Interfacing.AppTrackersInitialized = false;

Expand Down

0 comments on commit df8f77a

Please sign in to comment.