mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-11-23 09:49:16 +01:00
86079b029e
Flash Lightbar when at high latency now has the option to choose what you decide is high latency Show Notifications now has the option to only show warnings, such as when a controller cannot be grabbed exclusively Speaking of bad news for Windows 10 users: Hide DS4 has now been disabled, until i can figure out why this is, it will be disabled, this means some games that rely on this may not work properly or at all, sorry about that As for good news for Windows 10, did you know you can press Windows + G to open a game bar which can record games. For Windows 10 users, there's a new special action: Xbox Game DVR. Pick a trigger (only one button) and tapping/holding/or double tapping does various things, such as start/stop recording, save an ongoing recording, take a screenshot (via the xbox app's option or your own hotkey ie form steam), or just open the gamebar Much of the code has been updated with c# 6.0 Added manifest so DS4Windows can notice Windows 10 and high DPIs, also reorganized files
88 lines
1.8 KiB
C#
88 lines
1.8 KiB
C#
using System;
|
|
using System.ComponentModel;
|
|
|
|
namespace DS4Windows
|
|
{
|
|
public partial class ScpHub : Component
|
|
{
|
|
protected IntPtr m_Reference = IntPtr.Zero;
|
|
protected volatile Boolean m_Started = false;
|
|
|
|
public event EventHandler<DebugEventArgs> Debug = null;
|
|
|
|
public event EventHandler<ReportEventArgs> Report = null;
|
|
|
|
protected virtual Boolean LogDebug(String Data, bool warning)
|
|
{
|
|
DebugEventArgs args = new DebugEventArgs(Data, warning);
|
|
|
|
On_Debug(this, args);
|
|
|
|
return true;
|
|
}
|
|
|
|
public Boolean Active
|
|
{
|
|
get { return m_Started; }
|
|
}
|
|
|
|
|
|
public ScpHub()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
public ScpHub(IContainer container)
|
|
{
|
|
container.Add(this);
|
|
|
|
InitializeComponent();
|
|
}
|
|
|
|
|
|
public virtual Boolean Open()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public virtual Boolean Start()
|
|
{
|
|
return m_Started;
|
|
}
|
|
|
|
public virtual Boolean Stop()
|
|
{
|
|
return !m_Started;
|
|
}
|
|
|
|
public virtual Boolean Close()
|
|
{
|
|
if (m_Reference != IntPtr.Zero) ScpDevice.UnregisterNotify(m_Reference);
|
|
|
|
return !m_Started;
|
|
}
|
|
|
|
|
|
public virtual Boolean Suspend()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public virtual Boolean Resume()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
protected virtual void On_Debug(object sender, DebugEventArgs e)
|
|
{
|
|
if (Debug != null) Debug(sender, e);
|
|
}
|
|
|
|
|
|
protected virtual void On_Report(object sender, ReportEventArgs e)
|
|
{
|
|
if (Report != null) Report(sender, e);
|
|
}
|
|
}
|
|
}
|