diff --git a/inc/hgl/platform/SOC.h b/inc/hgl/platform/SOC.h index 174a0e9..51969fe 100644 --- a/inc/hgl/platform/SOC.h +++ b/inc/hgl/platform/SOC.h @@ -1,6 +1,7 @@ #pragma once #include +#include namespace hgl { @@ -31,7 +32,11 @@ namespace hgl struct SOCInfo { SOCVendor vendor; - char model[16]; + char model[32]; + + public: + + CompOperatorMemcmp(const SOCInfo &); }; /** diff --git a/src/SOC.cpp b/src/SOC.cpp index 6c76019..94c6906 100644 --- a/src/SOC.cpp +++ b/src/SOC.cpp @@ -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); }