Skip to content

Commit

Permalink
removing cheat manager
Browse files Browse the repository at this point in the history
well, that was funny but it was also a terrible use of CPU ressources.
  • Loading branch information
Valkirie committed Oct 10, 2022
1 parent 460fe22 commit fea87ef
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 143 deletions.
119 changes: 0 additions & 119 deletions HandheldCompanion/Managers/CheatManager.cs

This file was deleted.

2 changes: 1 addition & 1 deletion HandheldCompanion/Views/Pages/OverlayPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
<RadioButton Name="MachenikeHG510Radio">
<Label Content="{x:Static resx:Resources.OverlayPage_MachenikeHG510Controller}"></Label>
</RadioButton>
<RadioButton Name="ToyControllerRadio" IsEnabled="False">
<RadioButton Name="ToyControllerRadio">
<Label Content="{x:Static resx:Resources.OverlayPage_ToyController}"></Label>
</RadioButton>
</ui:RadioButtons>
Expand Down
8 changes: 0 additions & 8 deletions HandheldCompanion/Views/Pages/OverlayPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,6 @@ public void Page_Closed()
{
}

public void UnlockToyController()
{
this.Dispatcher.Invoke(() =>
{
ToyControllerRadio.IsEnabled = true;
});
}

private void UpdateUI_TrackpadsPosition(int trackpadsAlignment)
{
foreach (Button button in OverlayTrackpadsAlignment.Children)
Expand Down
15 changes: 0 additions & 15 deletions HandheldCompanion/Views/Windows/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ public partial class MainWindow : Window
public static ServiceManager serviceManager;
public static ProfileManager profileManager;
public static TaskManager taskManager;
public static CheatManager cheatManager;
public static PowerManager powerManager;
public static UpdateManager updateManager;

Expand Down Expand Up @@ -244,7 +243,6 @@ private void loadPages()
};
controllerPage.ControllerChanged += (Controller) =>
{
cheatManager.UpdateController(Controller); // update me
InputsManager.UpdateController(Controller);
};

Expand Down Expand Up @@ -279,7 +277,6 @@ private void loadManagers()
profileManager = new();
serviceManager = new ServiceManager("ControllerService", Properties.Resources.ServiceName, Properties.Resources.ServiceDescription);
taskManager = new TaskManager("HandheldCompanion", CurrentExe);
cheatManager = new();
powerManager = new();
updateManager = new();

Expand All @@ -289,7 +286,6 @@ private void loadManagers()
_managers.Add(profileManager);
_managers.Add(serviceManager);
_managers.Add(taskManager);
_managers.Add(cheatManager);
_managers.Add(powerManager);
_managers.Add(updateManager);

Expand Down Expand Up @@ -319,16 +315,6 @@ private void loadManagers()
_ = Dialog.ShowAsync($"{Properties.Resources.MainWindow_ServiceManager}", $"{Properties.Resources.MainWindow_ServiceManagerStopIssue}", ContentDialogButton.Primary, null, $"{Properties.Resources.MainWindow_OK}");
};

cheatManager.Cheated += (cheat) =>
{
switch (cheat)
{
case "OverlayControllerFisherPrice":
overlayPage?.UnlockToyController();
break;
}
};

SystemManager.SerialArrived += SystemManager_Updated;
SystemManager.SerialRemoved += SystemManager_Updated;

Expand Down Expand Up @@ -619,7 +605,6 @@ private void Window_Closed(object sender, EventArgs e)
if (pipeClient.connected)
pipeClient.Close();

cheatManager.Stop();
InputsManager.Stop();
SystemManager.Stop();

Expand Down

0 comments on commit fea87ef

Please sign in to comment.