コード例 #1
0
    private static GameRenderQuality 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(GameRenderQuality.Low);
                }
                if (num < 300)
                {
                    if (num > 220)
                    {
                        return(GameRenderQuality.Low);
                    }
                    return(GameRenderQuality.Low);
                }
                else if (num < 400)
                {
                    if (num >= 330)
                    {
                        return(GameRenderQuality.High);
                    }
                    if (num >= 320)
                    {
                        return(GameRenderQuality.Medium);
                    }
                    return(GameRenderQuality.Low);
                }
                else if (num >= 400)
                {
                    if (num < 420)
                    {
                        return(GameRenderQuality.Medium);
                    }
                    return(GameRenderQuality.High);
                }
            }
        }
        return(GameRenderQuality.Low);
    }
コード例 #2
0
    private static GameRenderQuality checkGPU_Tegra(string[] tokens)
    {
        bool flag = false;
        int  num  = 0;
        GameRenderQuality result = GameRenderQuality.Low;

        for (int i = 1; i < tokens.Length; i++)
        {
            if (DetectRenderQuality.TryGetInt(ref num, tokens[i]))
            {
                flag = true;
                if (num >= 4)
                {
                    result = GameRenderQuality.High;
                    break;
                }
                if (num == 3)
                {
                    result = GameRenderQuality.Medium;
                    break;
                }
            }
            else
            {
                string a = tokens[i];
                if (a == "k1")
                {
                    result = GameRenderQuality.High;
                    flag   = true;
                    break;
                }
            }
        }
        if (!flag)
        {
            result = GameRenderQuality.Medium;
        }
        return(result);
    }
コード例 #3
0
    private static GameRenderQuality checkGPU_PowerVR(string[] tokens)
    {
        bool flag  = false;
        bool flag2 = false;
        GameRenderQuality result = GameRenderQuality.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 = GameRenderQuality.Low;
                        }
                        else if (num == 543)
                        {
                            result = GameRenderQuality.Low;
                        }
                        else if (num == 544)
                        {
                            result = GameRenderQuality.Low;
                            if (flag3)
                            {
                                result = GameRenderQuality.Medium;
                            }
                        }
                        else
                        {
                            result = GameRenderQuality.Medium;
                        }
                        break;
                    }
                }
                else if (text.Length > 4)
                {
                    char c  = text[0];
                    char c2 = text[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 = GameRenderQuality.High;
                            }
                            else if (num >= 6000)
                            {
                                if (num < 6100)
                                {
                                    result = GameRenderQuality.Low;
                                }
                                else if (num < 6400)
                                {
                                    result = GameRenderQuality.Medium;
                                }
                                else
                                {
                                    result = GameRenderQuality.High;
                                }
                            }
                            else
                            {
                                result = GameRenderQuality.Low;
                            }
                            break;
                        }
                    }
                }
            }
        }
        if (flag2)
        {
            result = GameRenderQuality.High;
        }
        return(result);
    }
コード例 #4
0
    private static GameRenderQuality checkGPU_Mali(string[] tokens)
    {
        int num = 0;
        GameRenderQuality result = GameRenderQuality.Low;

        for (int i = 1; i < tokens.Length; i++)
        {
            string text = tokens[i];
            if (text.Length >= 3)
            {
                int  num2 = text.LastIndexOf("mp");
                bool flag = text[0] == 't';
                if (num2 > 0)
                {
                    int num3 = (!flag) ? 0 : 1;
                    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 = GameRenderQuality.Low;
                    }
                    else if (num < 500)
                    {
                        if (num == 400)
                        {
                            result = GameRenderQuality.Low;
                        }
                        else if (num == 450)
                        {
                            result = GameRenderQuality.Medium;
                        }
                        else
                        {
                            result = GameRenderQuality.Low;
                        }
                    }
                    else if (num < 700)
                    {
                        if (!flag)
                        {
                            result = GameRenderQuality.Low;
                        }
                        else if (num < 620)
                        {
                            result = GameRenderQuality.Low;
                        }
                        else if (num < 628)
                        {
                            result = GameRenderQuality.Medium;
                        }
                        else
                        {
                            result = GameRenderQuality.High;
                        }
                    }
                    else if (!flag)
                    {
                        result = GameRenderQuality.Low;
                    }
                    else
                    {
                        result = GameRenderQuality.High;
                    }
                    break;
                }
            }
        }
        return(result);
    }