2022-12-10 10:18:21 +01:00
|
|
|
using System.Diagnostics;
|
2022-12-10 17:00:09 +01:00
|
|
|
using System.Runtime.InteropServices;
|
2022-12-10 10:18:21 +01:00
|
|
|
using SteamController.Helpers;
|
|
|
|
|
|
|
|
|
|
namespace SteamController.Managers
|
|
|
|
|
{
|
|
|
|
|
public sealed class SASManager : Manager
|
|
|
|
|
{
|
2022-12-10 17:00:09 +01:00
|
|
|
internal static bool Valid { get; set; }
|
|
|
|
|
|
2022-12-10 10:18:21 +01:00
|
|
|
public override void Tick(Context context)
|
|
|
|
|
{
|
2022-12-10 17:00:09 +01:00
|
|
|
Valid = GetCursorPos(out var _);
|
2022-12-10 10:18:21 +01:00
|
|
|
}
|
2022-12-10 17:00:09 +01:00
|
|
|
|
|
|
|
|
[StructLayout(LayoutKind.Sequential)]
|
|
|
|
|
private struct POINT
|
|
|
|
|
{
|
|
|
|
|
public int X, Y;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[DllImport("user32.dll")]
|
|
|
|
|
private static extern bool GetCursorPos(out POINT lpPoint);
|
2022-12-10 10:18:21 +01:00
|
|
|
}
|
|
|
|
|
}
|