mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-11 19:11:08 +00:00
Bundle replace only for open non-Adreno pairs; Adreno bundles keep their numbered copies
This commit is contained in:
1 parent
24dfa920b5
commit
92e4eecb58
1 file changed
+3
-3
@@ -86,10 +86,10 @@ object DriverBundle {
|
||||
val manifest = File(work, MANIFEST).takeIf { it.isFile }
|
||||
?.let { runCatching { parseManifest(JSONObject(FileUtils.readString(it))) }.getOrNull() }
|
||||
?: throw IllegalArgumentException(context.getString(R.string.bundle_no_manifest))
|
||||
// The same bundle again (a pair picked again after another one): replace it rather
|
||||
// than keeping a "-2" copy whose drivers sit beside the old ones.
|
||||
// The same open non-Adreno pair again (picked again after another one): replace it
|
||||
// rather than keeping a "-2" copy beside the old one. Adreno bundles keep their copies.
|
||||
val sameId = LinuxVulkanDriverManager.sanitizeId(manifest.tag.ifEmpty { "${manifest.name}-${manifest.version}" })
|
||||
get(context, sameId)?.let { old ->
|
||||
get(context, sameId)?.takeIf { DriverPairs.isNonAdreno(it.id) }?.let { old ->
|
||||
Log.i(TAG, "replacing bundle ${old.id} (display ${old.androidId}, runtime ${old.linuxId})")
|
||||
remove(context, old)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user