Exverge
c1a1731324
Some checks failed
suyu-ci / Check REUSE Specification (push) Has been cancelled
suyu verify / Verify Format (push) Has been cancelled
suyu verify / test build (linux-fresh, clang) (push) Has been cancelled
suyu verify / test build (linux-fresh, linux) (push) Has been cancelled
suyu verify / test build (linux-mingw, windows) (push) Has been cancelled
suyu verify / android (push) Has been cancelled
codespell / Check for spelling errors (push) Successful in 11s
26 lines
835 B
Kotlin
26 lines
835 B
Kotlin
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
package org.suyu.suyu_emu.features.settings.model
|
|
|
|
import org.suyu.suyu_emu.utils.NativeConfig
|
|
|
|
enum class LongSetting(override val key: String) : AbstractLongSetting {
|
|
CUSTOM_RTC("custom_rtc");
|
|
|
|
override fun getLong(needsGlobal: Boolean): Long = NativeConfig.getLong(key, needsGlobal)
|
|
|
|
override fun setLong(value: Long) {
|
|
if (NativeConfig.isPerGameConfigLoaded()) {
|
|
global = false
|
|
}
|
|
NativeConfig.setLong(key, value)
|
|
}
|
|
|
|
override val defaultValue: Long by lazy { NativeConfig.getDefaultToString(key).toLong() }
|
|
|
|
override fun getValueAsString(needsGlobal: Boolean): String = getLong(needsGlobal).toString()
|
|
|
|
override fun reset() = NativeConfig.setLong(key, defaultValue)
|
|
}
|