improved soc check for Qualcomm
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include<hgl/TypeFunc.h>
|
#include<hgl/TypeFunc.h>
|
||||||
|
#include<hgl/CompOperator.h>
|
||||||
|
|
||||||
namespace hgl
|
namespace hgl
|
||||||
{
|
{
|
||||||
@@ -31,7 +32,11 @@ namespace hgl
|
|||||||
struct SOCInfo
|
struct SOCInfo
|
||||||
{
|
{
|
||||||
SOCVendor vendor;
|
SOCVendor vendor;
|
||||||
char model[16];
|
char model[32];
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
CompOperatorMemcmp(const SOCInfo &);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -17,12 +17,14 @@ namespace
|
|||||||
p+=9;
|
p+=9;
|
||||||
if(*p=='T') //"Qualcomm Technologies, Inc" 但是里面有写逗号的有写句号的,所以我找最后的Inc
|
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)
|
if(!p)
|
||||||
return(false);
|
return(false);
|
||||||
|
|
||||||
p+=4;
|
p+=3;
|
||||||
|
|
||||||
|
while(!hgl::isalpha(*p))++p; //碰到字母再停下来
|
||||||
|
|
||||||
hgl::strcpy(soc.model,sizeof(soc.model),p);
|
hgl::strcpy(soc.model,sizeof(soc.model),p);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user