From d5e9bade48386ed7b47a7db69dcf981652be5e3b Mon Sep 17 00:00:00 2001 From: dualshock-tools Date: Tue, 14 May 2024 07:19:41 +0200 Subject: [PATCH] Updated controller model detection --- core.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core.js b/core.js index 02ca031..e0220d6 100644 --- a/core.js +++ b/core.js @@ -62,7 +62,7 @@ function ds4_hw_to_bm(hw_ver) { return "JDM-011"; } else if(a == 0x54) { return "JDM-030"; - } else if(a == 0x64 || a == 0x74) { + } else if(a >= 0x64 || a <= 0x74) { return "JDM-040"; } else if((a > 0x80 && a < 0x84) || a == 0x93) { return "JDM-020"; @@ -82,7 +82,7 @@ function ds4_hw_to_bm(hw_ver) { function is_rare(hw_ver) { a = hw_ver >> 8; b = a >> 4; - return ((b == 7 && a != 0x74) || (b == 9 && a != 0x93) || a == 0xb0 || a == 0xa0); + return ((b == 7 && a > 0x74) || (b == 9 && a != 0x93) || a == 0xa0); } async function ds4_info() {