From 309f8163fa0ea6aed2eaade9881f4670e6657679 Mon Sep 17 00:00:00 2001 From: Gabriel Correia Date: Thu, 4 Jan 2024 09:32:41 -0300 Subject: [PATCH] `Project`: Updates the app version with corrections --- app/build.gradle.kts | 4 ++-- app/src/main/java/emu/cosmic/helpers/DriverHelper.kt | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index cdf65881..874e779a 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -14,8 +14,8 @@ android { minSdk = 31 targetSdk = 34 - versionCode = 16 - versionName = "0.0.16" + versionCode = 17 + versionName = "0.0.17" ndk { abiFilters.clear() abiFilters.add("arm64-v8a") diff --git a/app/src/main/java/emu/cosmic/helpers/DriverHelper.kt b/app/src/main/java/emu/cosmic/helpers/DriverHelper.kt index d70a41f3..0dbda670 100644 --- a/app/src/main/java/emu/cosmic/helpers/DriverHelper.kt +++ b/app/src/main/java/emu/cosmic/helpers/DriverHelper.kt @@ -24,7 +24,7 @@ class DriverHelper : ViewModel() { val settings = CosmicSettings.globalSettings var driversDir = File(settings.appStorage, "Drivers") - private val driversPack: Array get() = driversDir.listFiles() + private val driversPack: Array? get() = driversDir.listFiles() fun getVendorDriver() : DriverContainer { val info = DriverMeta("Vulkan", "Vendor driver", "Qualcomm", "Unknown", "Adreno", "Unknown", "31", "libvulkan.so") @@ -37,7 +37,7 @@ class DriverHelper : ViewModel() { } fun getInUse(default: Int): Int { - driversPack.forEachIndexed { index, drv -> + driversPack?.forEachIndexed { index, drv -> val drvFiles = File(drv.path).listFiles()!! // The first index is always the system driver, so we need to increment the return value by one if (drvFiles.first { it.extension == "so" }.path == settings.customDriver) @@ -124,7 +124,7 @@ class DriverHelper : ViewModel() { } fun getInstalledDrivers(): List { - driversPack.forEach { driverDir -> + driversPack?.forEach { driverDir -> val wasInstalled = driverList.filter { it.driverPath == driverDir.path }