improved soc check for Qualcomm

This commit is contained in:
2023-07-13 21:10:46 +08:00
parent 47fa987153
commit 22070d4169
2 changed files with 10 additions and 3 deletions

View File

@@ -1,6 +1,7 @@
#pragma once
#include<hgl/TypeFunc.h>
#include<hgl/CompOperator.h>
namespace hgl
{
@@ -31,7 +32,11 @@ namespace hgl
struct SOCInfo
{
SOCVendor vendor;
char model[16];
char model[32];
public:
CompOperatorMemcmp(const SOCInfo &);
};
/**

View File

@@ -17,12 +17,14 @@ namespace
p+=9;
if(*p=='T') //"Qualcomm Technologies, Inc" 但是里面有写逗号的有写句号的所以我找最后的Inc
{
p=hgl::stristr(p,hgl::strlen(p),"Inc ",4);
p=hgl::stristr(p,hgl::strlen(p),"Inc",3);
if(!p)
return(false);
p+=4;
p+=3;
while(!hgl::isalpha(*p))++p; //碰到字母再停下来
hgl::strcpy(soc.model,sizeof(soc.model),p);
}