Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions app/src/main/java/app/gamenative/utils/BestConfigService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import com.winlator.box86_64.Box86_64PresetManager
import com.winlator.container.Container
import com.winlator.container.ContainerData
import com.winlator.contents.ContentProfile
import com.winlator.core.GPUBlackist
import com.winlator.fexcore.FEXCorePresetManager
import com.winlator.core.KeyValueSet
import kotlinx.coroutines.Dispatchers
Expand Down Expand Up @@ -729,10 +730,16 @@ object BestConfigService {
resultMap["graphicsDriver"] = filteredJson.optString("graphicsDriver", "")
}
if (filteredJson.has("graphicsDriverVersion") && !filteredJson.isNull("graphicsDriverVersion")) {
resultMap["graphicsDriverVersion"] = filteredJson.optString("graphicsDriverVersion", "")
val version = filteredJson.optString("graphicsDriverVersion", "")
if (!version.contains("turnip", ignoreCase = true) || !GPUBlackist.isTurnipBlacklisted()) {
resultMap["graphicsDriverVersion"] = version
}
}
if (filteredJson.has("graphicsDriverConfig") && !filteredJson.isNull("graphicsDriverConfig")) {
resultMap["graphicsDriverConfig"] = filteredJson.optString("graphicsDriverConfig", "")
val config = filteredJson.optString("graphicsDriverConfig", "")
if (!config.contains("turnip", ignoreCase = true) || !GPUBlackist.isTurnipBlacklisted()) {
resultMap["graphicsDriverConfig"] = config
}
}
if (filteredJson.has("dxwrapper") && !filteredJson.isNull("dxwrapper")) {
resultMap["dxwrapper"] = filteredJson.optString("dxwrapper", "")
Expand Down
23 changes: 23 additions & 0 deletions app/src/main/java/com/winlator/core/GPUBlackist.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package com.winlator.core;

import android.os.Build;

public class GPUBlackist {

public static boolean isTurnipBlacklisted() {
if ((Build.MANUFACTURER.compareToIgnoreCase("OCULUS") == 0) ||
(Build.MANUFACTURER.compareToIgnoreCase("META") == 0)) {
return switch (Build.PRODUCT) {
//Quest 1
case "monterey", "vr_monterey" -> false;
//Quest 2, Quest Pro
case "hollywood", "seacliff" -> false;
//Quest 3, Quest 3s
case "eureka", "stinson", "panther" -> true;
//future devices
default -> true;
};
}
return false;
}
}
4 changes: 3 additions & 1 deletion app/src/main/java/com/winlator/core/GPUInformation.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import android.content.Context;
import android.opengl.EGL14;
import android.os.Build;
import android.util.Log;

import androidx.collection.ArrayMap;
Expand Down Expand Up @@ -97,6 +98,7 @@ private static ArrayMap<String, String> loadGPUInformation(Context context) {
String gpuRenderer = Objects.toString(gl.glGetString(GL10.GL_RENDERER), "");
String gpuVendor = Objects.toString(gl.glGetString(GL10.GL_VENDOR), "");
String gpuVersion = Objects.toString(gl.glGetString(GL10.GL_VERSION), "");
if (GPUBlackist.isTurnipBlacklisted()) gpuRenderer += " - " + Build.MANUFACTURER;

gpuInfo.put("renderer", gpuRenderer);
gpuInfo.put("vendor", gpuVendor);
Expand Down Expand Up @@ -162,7 +164,7 @@ public static boolean isAdreno8Elite(Context context) {
public static boolean isTurnipCapable(Context context) {
String r = getRenderer(context).toLowerCase(Locale.ENGLISH);
// match “adreno 610…699” or “adreno 710…799”
return r.contains("adreno") && r.matches(".*\\b[67][0-9]{2}\\b.*");
return r.contains("adreno") && r.matches(".*\\b[67][0-9]{2}\\b.*") && !GPUBlackist.isTurnipBlacklisted();
}

/**
Expand Down
Loading