- Fix program not loading properly for some users
This commit is contained in:
parent
a68a2ee424
commit
2030247716
2 changed files with 8 additions and 2 deletions
|
@ -105,6 +105,12 @@ namespace BetterJoyForCemu {
|
|||
hid_device_info enumerate; // Add device to list
|
||||
while (ptr != IntPtr.Zero) {
|
||||
enumerate = (hid_device_info)Marshal.PtrToStructure(ptr, typeof(hid_device_info));
|
||||
|
||||
if (enumerate.serial_number == null) {
|
||||
ptr = enumerate.next;
|
||||
continue;
|
||||
}
|
||||
|
||||
// TODO: try checking against interface number instead
|
||||
if (!ContainsText(list_customControllers, enumerate.product_string) && !ContainsText(list_allControllers, enumerate.product_string)) {
|
||||
list_allControllers.Items.Add(new SController(enumerate.product_string, enumerate.vendor_id, enumerate.product_id, 0));
|
||||
|
|
|
@ -120,11 +120,11 @@ namespace BetterJoyForCemu {
|
|||
SController thirdParty = null;
|
||||
enumerate = (hid_device_info)Marshal.PtrToStructure(ptr, typeof(hid_device_info));
|
||||
|
||||
/*if (enumerate.serial_number == null) {
|
||||
if (enumerate.serial_number == null) {
|
||||
ptr = enumerate.next; // can't believe it took me this long to figure out why USB connections used up so much CPU.
|
||||
// it was getting stuck in an inf loop here!
|
||||
continue;
|
||||
}*/
|
||||
}
|
||||
|
||||
if (form.nonOriginal) {
|
||||
enumerate.product_id = product_pro;
|
||||
|
|
Loading…
Add table
Reference in a new issue