1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Android: Fix export and runtime logic to check if using Vulkan

Also fix iOS export logic that would force a min target of iOS 14.0 (for Metal)
even when targeting the Compatibility renderer.

Co-authored-by: Pāvels Nadtočajevs <7645683+bruvzg@users.noreply.github.com>
This commit is contained in:
Anish Mishra
2025-02-22 09:23:32 +05:30
committed by Rémi Verschelde
parent b77423370a
commit 28d1dccf63
6 changed files with 31 additions and 7 deletions

View File

@@ -825,10 +825,11 @@ class Godot(private val context: Context) {
* Returns true if `Vulkan` is used for rendering.
*/
private fun usesVulkan(): Boolean {
var rendererSource = "ProjectSettings"
var renderer = GodotLib.getGlobal("rendering/renderer/rendering_method")
val rendererInfo = GodotLib.getRendererInfo()
var renderingDeviceSource = "ProjectSettings"
var renderingDevice = GodotLib.getGlobal("rendering/rendering_device/driver")
var renderingDevice = rendererInfo[0]
var rendererSource = "ProjectSettings"
var renderer = rendererInfo[1]
val cmdline = getCommandLine()
var index = cmdline.indexOf("--rendering-method")
if (index > -1 && cmdline.size > index + 1) {

View File

@@ -189,6 +189,15 @@ public class GodotLib {
*/
public static native String getGlobal(String p_key);
/**
* Used to get info about the current rendering system.
*
* @return A String array with two elements:
* [0] Rendering driver name.
* [1] Rendering method.
*/
public static native String[] getRendererInfo();
/**
* Used to access Godot's editor settings.
* @param settingKey Setting key