mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-12-25 16:11:49 +01:00
Remove unnecessary try-catch block in HidLibrary
Newer HidLibrary did not work out. Related to issue #180.
This commit is contained in:
parent
b71b3ec820
commit
fda67e7fba
@ -448,8 +448,6 @@ namespace DS4Windows
|
|||||||
{
|
{
|
||||||
SafeFileHandle hidHandle;
|
SafeFileHandle hidHandle;
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
if (isExclusive)
|
if (isExclusive)
|
||||||
{
|
{
|
||||||
hidHandle = NativeMethods.CreateFile(devicePathName, NativeMethods.GENERIC_READ | NativeMethods.GENERIC_WRITE, 0, IntPtr.Zero, NativeMethods.OpenExisting, 0x20000000 | 0x80000000 | NativeMethods.FILE_FLAG_OVERLAPPED, 0);
|
hidHandle = NativeMethods.CreateFile(devicePathName, NativeMethods.GENERIC_READ | NativeMethods.GENERIC_WRITE, 0, IntPtr.Zero, NativeMethods.OpenExisting, 0x20000000 | 0x80000000 | NativeMethods.FILE_FLAG_OVERLAPPED, 0);
|
||||||
@ -458,11 +456,7 @@ namespace DS4Windows
|
|||||||
{
|
{
|
||||||
hidHandle = NativeMethods.CreateFile(devicePathName, NativeMethods.GENERIC_READ | NativeMethods.GENERIC_WRITE, NativeMethods.FILE_SHARE_READ | NativeMethods.FILE_SHARE_WRITE, IntPtr.Zero, NativeMethods.OpenExisting, 0x20000000 | 0x80000000 | NativeMethods.FILE_FLAG_OVERLAPPED, 0);
|
hidHandle = NativeMethods.CreateFile(devicePathName, NativeMethods.GENERIC_READ | NativeMethods.GENERIC_WRITE, NativeMethods.FILE_SHARE_READ | NativeMethods.FILE_SHARE_WRITE, IntPtr.Zero, NativeMethods.OpenExisting, 0x20000000 | 0x80000000 | NativeMethods.FILE_FLAG_OVERLAPPED, 0);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
catch (Exception)
|
|
||||||
{
|
|
||||||
throw;
|
|
||||||
}
|
|
||||||
return hidHandle;
|
return hidHandle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
TODO.md
2
TODO.md
@ -11,7 +11,7 @@ C++ test application before attempting to work it into DS4Windows.~~
|
|||||||
Currently used to delay hotplug routine
|
Currently used to delay hotplug routine
|
||||||
* Attempt to remove more unused components
|
* Attempt to remove more unused components
|
||||||
* ~~Tweak layout of some forms~~
|
* ~~Tweak layout of some forms~~
|
||||||
* Look into updating HidLibrary
|
* ~~Look into updating HidLibrary~~
|
||||||
* ~~Trim code execution for touchpad data. Remove unneeded new calls for Touch
|
* ~~Trim code execution for touchpad data. Remove unneeded new calls for Touch
|
||||||
instances. Make permanent instances and reuse those instances.~~
|
instances. Make permanent instances and reuse those instances.~~
|
||||||
* ~~Tweak SixAxis code to attempt to improve steering wheel performance
|
* ~~Tweak SixAxis code to attempt to improve steering wheel performance
|
||||||
|
Loading…
Reference in New Issue
Block a user