-
Notifications
You must be signed in to change notification settings - Fork 2.6k
/
EmulatedController.kt
57 lines (39 loc) · 1.54 KB
/
EmulatedController.kt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
// SPDX-License-Identifier: GPL-2.0-or-later
package org.dolphinemu.dolphinemu.features.input.model.controlleremu
import androidx.annotation.Keep
/**
* Represents a C++ ControllerEmu::EmulatedController.
*
* The lifetime of this class is managed by C++ code. Calling methods on it after it's destroyed
* in C++ is undefined behavior!
*/
@Keep
class EmulatedController private constructor(private val pointer: Long) {
external fun getDefaultDevice(): String
external fun setDefaultDevice(device: String)
external fun getGroupCount(): Int
external fun getGroup(index: Int): ControlGroup
external fun updateSingleControlReference(controlReference: ControlReference)
external fun loadDefaultSettings()
external fun clearSettings()
external fun loadProfile(path: String)
external fun saveProfile(path: String)
external fun getProfileName(): String
companion object {
@JvmStatic
external fun getGcPad(controllerIndex: Int): EmulatedController
@JvmStatic
external fun getGcKeyboard(controllerIndex: Int): EmulatedController
@JvmStatic
external fun getWiimote(controllerIndex: Int): EmulatedController
@JvmStatic
external fun getWiimoteAttachment(
controllerIndex: Int,
attachmentIndex: Int
): EmulatedController
@JvmStatic
external fun getSelectedWiimoteAttachment(controllerIndex: Int): Int
@JvmStatic
external fun getSidewaysWiimoteSetting(controllerIndex: Int): NumericSetting
}
}