Android: Convert Control to Kotlin

This commit is contained in:
Charles Lombardo
2023-06-10 05:05:01 -04:00
parent 0454578f45
commit fafbb2199e
2 changed files with 7 additions and 16 deletions

View File

@ -1,8 +1,8 @@
// SPDX-License-Identifier: GPL-2.0-or-later
package org.dolphinemu.dolphinemu.features.input.model.controlleremu;
package org.dolphinemu.dolphinemu.features.input.model.controlleremu
import androidx.annotation.Keep;
import androidx.annotation.Keep
/**
* Represents a C++ ControllerEmu::Control.
@ -10,18 +10,9 @@ import androidx.annotation.Keep;
* The lifetime of this class is managed by C++ code. Calling methods on it after it's destroyed
* in C++ is undefined behavior!
*/
public class Control
{
@Keep
private final long mPointer;
@Keep
class Control private constructor(private val pointer: Long) {
external fun getUiName(): String
@Keep
private Control(long pointer)
{
mPointer = pointer;
}
public native String getUiName();
public native ControlReference getControlReference();
external fun getControlReference(): ControlReference
}