suyu/src/android/app/src/main/java/org/suyu/suyu_emu/model/Driver.kt
SylverDiscord51 1648d189d3
license-fix (#31)
Co-authored-by: palfaiate <syl.paulo.alfaiate@gmail.com>
Co-authored-by: SylverDiscord51 <p71468162@gmail.com>
Co-committed-by: SylverDiscord51 <p71468162@gmail.com>
2024-03-23 22:58:07 -03:00

29 lines
776 B
Kotlin

// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.model
import org.suyu.suyu_emu.utils.GpuDriverMetadata
data class Driver(
override var selected: Boolean,
val title: String,
val version: String = "",
val description: String = ""
) : SelectableItem {
override fun onSelectionStateChanged(selected: Boolean) {
this.selected = selected
}
companion object {
fun GpuDriverMetadata.toDriver(selected: Boolean = false): Driver =
Driver(
selected,
this.name ?: "",
this.version ?: "",
this.description ?: ""
)
}
}