mirror of
https://github.com/nefarius/ViGEmBus.git
synced 2025-08-10 00:52:17 +00:00
Finished implementation of "vigem_target_x360_get_user_index"
This commit is contained in:
@@ -35,6 +35,8 @@ SOFTWARE.
|
||||
#include <climits>
|
||||
#include <mutex>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#define VIGEM_TARGETS_MAX USHRT_MAX
|
||||
|
||||
//
|
||||
@@ -778,12 +780,11 @@ VIGEM_ERROR vigem_target_x360_get_user_index(
|
||||
return VIGEM_ERROR_INVALID_TARGET;
|
||||
}
|
||||
|
||||
// TODO: handle userindex out-of-range situation here
|
||||
//if (error == ???)
|
||||
//{
|
||||
// CloseHandle(lOverlapped.hEvent);
|
||||
// return VIGEM_ERROR_XUSB_USERINDEX_OUT_OF_RANGE;
|
||||
//}
|
||||
if (error == ERROR_INVALID_DEVICE_OBJECT_PARAMETER)
|
||||
{
|
||||
CloseHandle(lOverlapped.hEvent);
|
||||
return VIGEM_ERROR_XUSB_USERINDEX_OUT_OF_RANGE;
|
||||
}
|
||||
}
|
||||
|
||||
CloseHandle(lOverlapped.hEvent);
|
||||
|
||||
Reference in New Issue
Block a user