コード例 #1
0
        private static SGameRenderQuality checkGPU_Adreno(string[] tokens)
        {
            int num = 0;

            for (int i = 1; i < tokens.Length; i++)
            {
                if (DetectRenderQuality.TryGetInt(ref num, tokens[i]))
                {
                    if (num < 200)
                    {
                        return(SGameRenderQuality.Low);
                    }
                    if (num < 300)
                    {
                        if (num > 220)
                        {
                            return(SGameRenderQuality.Low);
                        }
                        return(SGameRenderQuality.Low);
                    }
                    else if (num < 400)
                    {
                        if (num >= 330)
                        {
                            return(SGameRenderQuality.High);
                        }
                        if (num >= 320)
                        {
                            return(SGameRenderQuality.Medium);
                        }
                        return(SGameRenderQuality.Low);
                    }
                    else if (num >= 400)
                    {
                        if (num < 420)
                        {
                            return(SGameRenderQuality.Medium);
                        }
                        return(SGameRenderQuality.High);
                    }
                }
            }
            return(SGameRenderQuality.Low);
        }
コード例 #2
0
        private static SGameRenderQuality checkGPU_Tegra(string[] tokens)
        {
            bool flag = false;
            int  num  = 0;
            SGameRenderQuality result = SGameRenderQuality.Low;

            for (int i = 1; i < tokens.Length; i++)
            {
                if (DetectRenderQuality.TryGetInt(ref num, tokens[i]))
                {
                    flag = true;
                    if (num >= 4)
                    {
                        result = SGameRenderQuality.High;
                        break;
                    }
                    if (num == 3)
                    {
                        result = SGameRenderQuality.Medium;
                        break;
                    }
                }
                else
                {
                    string text = tokens[i];
                    if (text == "k1")
                    {
                        result = SGameRenderQuality.High;
                        flag   = true;
                        break;
                    }
                }
            }
            if (!flag)
            {
                result = SGameRenderQuality.Medium;
            }
            return(result);
        }
コード例 #3
0
        private static SGameRenderQuality checkGPU_PowerVR(string[] tokens)
        {
            bool flag  = false;
            bool flag2 = false;
            SGameRenderQuality result = SGameRenderQuality.Low;
            int num = 0;

            for (int i = 1; i < tokens.Length; i++)
            {
                string text = tokens[i];
                if (text == "sgx")
                {
                    flag = true;
                }
                else
                {
                    if (text == "rogue")
                    {
                        flag2 = true;
                        break;
                    }
                    if (flag)
                    {
                        bool flag3 = false;
                        int  num2  = text.IndexOf("mp");
                        if (num2 > 0)
                        {
                            DetectRenderQuality.TryGetInt(ref num, text.Substring(0, num2));
                            flag3 = true;
                        }
                        else if (DetectRenderQuality.TryGetInt(ref num, text))
                        {
                            for (int j = i + 1; j < tokens.Length; j++)
                            {
                                text = tokens[j].ToLower();
                                if (text.IndexOf("mp") >= 0)
                                {
                                    flag3 = true;
                                    break;
                                }
                            }
                        }
                        if (num > 0)
                        {
                            if (num < 543)
                            {
                                result = SGameRenderQuality.Low;
                            }
                            else if (num == 543)
                            {
                                result = SGameRenderQuality.Low;
                            }
                            else if (num == 544)
                            {
                                result = SGameRenderQuality.Low;
                                if (flag3)
                                {
                                    result = SGameRenderQuality.Medium;
                                }
                            }
                            else
                            {
                                result = SGameRenderQuality.Medium;
                            }
                            break;
                        }
                    }
                    else if (text.get_Length() > 4)
                    {
                        char c  = text.get_Chars(0);
                        char c2 = text.get_Chars(1);
                        if (c == 'g')
                        {
                            if (c2 >= '0' && c2 <= '9')
                            {
                                DetectRenderQuality.TryGetInt(ref num, text.Substring(1));
                            }
                            else
                            {
                                DetectRenderQuality.TryGetInt(ref num, text.Substring(2));
                            }
                            if (num > 0)
                            {
                                if (num >= 7000)
                                {
                                    result = SGameRenderQuality.High;
                                }
                                else if (num >= 6000)
                                {
                                    if (num < 6100)
                                    {
                                        result = SGameRenderQuality.Low;
                                    }
                                    else if (num < 6400)
                                    {
                                        result = SGameRenderQuality.Medium;
                                    }
                                    else
                                    {
                                        result = SGameRenderQuality.High;
                                    }
                                }
                                else
                                {
                                    result = SGameRenderQuality.Low;
                                }
                                break;
                            }
                        }
                    }
                }
            }
            if (flag2)
            {
                result = SGameRenderQuality.High;
            }
            return(result);
        }
コード例 #4
0
        private static SGameRenderQuality checkGPU_Mali(string[] tokens)
        {
            int num = 0;
            SGameRenderQuality result = SGameRenderQuality.Low;

            for (int i = 1; i < tokens.Length; i++)
            {
                string text = tokens[i];
                if (text.get_Length() >= 3)
                {
                    int  num2 = text.LastIndexOf("mp");
                    bool flag = text.get_Chars(0) == 't';
                    if (num2 > 0)
                    {
                        int num3 = flag ? 1 : 0;
                        text = text.Substring(num3, num2 - num3);
                        DetectRenderQuality.TryGetInt(ref num, text);
                    }
                    else
                    {
                        if (flag)
                        {
                            text = text.Substring(1);
                        }
                        if (DetectRenderQuality.TryGetInt(ref num, text))
                        {
                            for (int j = i + 1; j < tokens.Length; j++)
                            {
                                text = tokens[j];
                                if (text.IndexOf("mp") >= 0)
                                {
                                    break;
                                }
                            }
                        }
                    }
                    if (num > 0)
                    {
                        if (num < 400)
                        {
                            result = SGameRenderQuality.Low;
                        }
                        else if (num < 500)
                        {
                            if (num == 400)
                            {
                                result = SGameRenderQuality.Low;
                            }
                            else if (num == 450)
                            {
                                result = SGameRenderQuality.Medium;
                            }
                            else
                            {
                                result = SGameRenderQuality.Low;
                            }
                        }
                        else if (num < 700)
                        {
                            if (!flag)
                            {
                                result = SGameRenderQuality.Low;
                            }
                            else if (num < 620)
                            {
                                result = SGameRenderQuality.Low;
                            }
                            else if (num < 628)
                            {
                                result = SGameRenderQuality.Medium;
                            }
                            else
                            {
                                result = SGameRenderQuality.High;
                            }
                        }
                        else if (!flag)
                        {
                            result = SGameRenderQuality.Low;
                        }
                        else
                        {
                            result = SGameRenderQuality.High;
                        }
                        break;
                    }
                }
            }
            return(result);
        }