mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
android: Fix compilation error from Kotlin changes
Since the ThemeProvider interface changed `fun getThemeId()` to `var themeId`, I had to adjust how it was used in the EmulationActivity. Similar case for `fun getConfiguredControllerType()`.
This commit is contained in:
@ -65,7 +65,7 @@ class EmulationActivity : AppCompatActivity(), ThemeProvider {
|
|||||||
|
|
||||||
private lateinit var settings: Settings
|
private lateinit var settings: Settings
|
||||||
|
|
||||||
private var themeId = 0
|
override var themeId = 0
|
||||||
|
|
||||||
private var menuVisible = false
|
private var menuVisible = false
|
||||||
|
|
||||||
@ -513,7 +513,7 @@ class EmulationActivity : AppCompatActivity(), ThemeProvider {
|
|||||||
val builder = MaterialAlertDialogBuilder(this)
|
val builder = MaterialAlertDialogBuilder(this)
|
||||||
.setTitle(R.string.emulation_toggle_controls)
|
.setTitle(R.string.emulation_toggle_controls)
|
||||||
|
|
||||||
val currentController = InputOverlay.getConfiguredControllerType()
|
val currentController = InputOverlay.configuredControllerType
|
||||||
|
|
||||||
if (currentController == InputOverlay.OVERLAY_GAMECUBE) {
|
if (currentController == InputOverlay.OVERLAY_GAMECUBE) {
|
||||||
val gcEnabledButtons = BooleanArray(11)
|
val gcEnabledButtons = BooleanArray(11)
|
||||||
@ -577,7 +577,7 @@ class EmulationActivity : AppCompatActivity(), ThemeProvider {
|
|||||||
val currentValue = IntSetting.MAIN_DOUBLE_TAP_BUTTON.int
|
val currentValue = IntSetting.MAIN_DOUBLE_TAP_BUTTON.int
|
||||||
|
|
||||||
val buttonList =
|
val buttonList =
|
||||||
if (InputOverlay.getConfiguredControllerType() == InputOverlay.OVERLAY_WIIMOTE_CLASSIC) R.array.doubleTapWithClassic else R.array.doubleTap
|
if (InputOverlay.configuredControllerType == InputOverlay.OVERLAY_WIIMOTE_CLASSIC) R.array.doubleTapWithClassic else R.array.doubleTap
|
||||||
|
|
||||||
var checkedItem = -1
|
var checkedItem = -1
|
||||||
val itemCount = resources.getStringArray(buttonList).size
|
val itemCount = resources.getStringArray(buttonList).size
|
||||||
@ -898,8 +898,6 @@ class EmulationActivity : AppCompatActivity(), ThemeProvider {
|
|||||||
this.themeId = themeId
|
this.themeId = themeId
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getThemeId(): Int = themeId
|
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
private const val BACKSTACK_NAME_MENU = "menu"
|
private const val BACKSTACK_NAME_MENU = "menu"
|
||||||
private const val BACKSTACK_NAME_SUBMENU = "submenu"
|
private const val BACKSTACK_NAME_SUBMENU = "submenu"
|
||||||
|
Reference in New Issue
Block a user