upload
This commit is contained in:
commit
1c7a8cf25f
579 files changed
+83196
No files matched your search
@@ -0,0 +1,34 @@
|
||||
using System.Threading;
|
||||
|
||||
namespace VibranceHud.Startup;
|
||||
|
||||
internal static class CrashHandBack
|
||||
{
|
||||
private static MultiMonitorGammaRamp? _ramp;
|
||||
|
||||
internal static void Register(MultiMonitorGammaRamp ramp)
|
||||
{
|
||||
Volatile.Write(ref _ramp, ramp);
|
||||
}
|
||||
|
||||
internal static void Forget()
|
||||
{
|
||||
Volatile.Write(ref _ramp, null);
|
||||
}
|
||||
|
||||
internal static void Run()
|
||||
{
|
||||
MultiMonitorGammaRamp multiMonitorGammaRamp = Interlocked.Exchange(ref _ramp, null);
|
||||
if (multiMonitorGammaRamp == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
try
|
||||
{
|
||||
multiMonitorGammaRamp.Dispose();
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user