mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -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)
|
return setting.delete(settings)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getInt(): Int {
|
override val int: Int
|
||||||
return setting.getInt() / scale
|
get() = setting.int / scale
|
||||||
}
|
|
||||||
|
|
||||||
override fun setInt(settings: Settings, newValue: Int) {
|
override fun setInt(settings: Settings, newValue: Int) {
|
||||||
return setting.setInt(settings, newValue * scale)
|
return setting.setInt(settings, newValue * scale)
|
||||||
|
Loading…
Reference in New Issue
Block a user