mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 13:27:45 -07:00
Android: Convert AbstractIntSetting to Kotlin
This commit is contained in:
parent
baeeaa2a43
commit
32f9e48257
@ -1,12 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.dolphinemu.dolphinemu.features.settings.model;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
public interface AbstractIntSetting extends AbstractSetting
|
||||
{
|
||||
int getInt();
|
||||
|
||||
void setInt(@NonNull Settings settings, int newValue);
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.dolphinemu.dolphinemu.features.settings.model
|
||||
|
||||
interface AbstractIntSetting : AbstractSetting {
|
||||
val int: Int
|
||||
|
||||
fun setInt(settings: Settings, newValue: Int)
|
||||
}
|
@ -16,9 +16,8 @@ class ScaledIntSetting(
|
||||
return setting.delete(settings)
|
||||
}
|
||||
|
||||
override fun getInt(): Int {
|
||||
return setting.getInt() / scale
|
||||
}
|
||||
override val int: Int
|
||||
get() = setting.int / scale
|
||||
|
||||
override fun setInt(settings: Settings, newValue: Int) {
|
||||
return setting.setInt(settings, newValue * scale)
|
||||
|
Loading…
Reference in New Issue
Block a user