- 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
|
hid_device_info enumerate; // Add device to list
|
||||||
while (ptr != IntPtr.Zero) {
|
while (ptr != IntPtr.Zero) {
|
||||||
enumerate = (hid_device_info)Marshal.PtrToStructure(ptr, typeof(hid_device_info));
|
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
|
// TODO: try checking against interface number instead
|
||||||
if (!ContainsText(list_customControllers, enumerate.product_string) && !ContainsText(list_allControllers, enumerate.product_string)) {
|
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));
|
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;
|
SController thirdParty = null;
|
||||||
enumerate = (hid_device_info)Marshal.PtrToStructure(ptr, typeof(hid_device_info));
|
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.
|
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!
|
// it was getting stuck in an inf loop here!
|
||||||
continue;
|
continue;
|
||||||
}*/
|
}
|
||||||
|
|
||||||
if (form.nonOriginal) {
|
if (form.nonOriginal) {
|
||||||
enumerate.product_id = product_pro;
|
enumerate.product_id = product_pro;
|
||||||
|
|
Loading…
Add table
Reference in a new issue