mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2025-12-16 12:08:49 +00:00
Add android support
This commit is contained in:
parent
4d31469062
commit
21a20b4bd6
@ -805,7 +805,6 @@ object NativeLibrary {
|
||||
const val BUTTON_GPIO14 = 782
|
||||
const val BUTTON_TURBO = 783
|
||||
const val BUTTON_SWAP = 800
|
||||
const val BUTTON_TURBO = 801
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -20,6 +20,11 @@ class HotkeyUtility(
|
||||
var HotkeyIsPressed = false
|
||||
|
||||
fun handleHotkey(bindedButton: Int): Boolean {
|
||||
if (bindedButton == NativeLibrary.ButtonType.BUTTON_TURBO) {
|
||||
TurboHelper.toggleTurbo(true)
|
||||
HotkeyIsPressed = true
|
||||
return true
|
||||
}
|
||||
if(hotkeyButtons.contains(bindedButton)) {
|
||||
when (bindedButton) {
|
||||
Hotkey.SWAP_SCREEN.button -> screenAdjustmentUtil.swapScreen()
|
||||
|
||||
@ -121,6 +121,7 @@ class Settings {
|
||||
const val KEY_BUTTON_SELECT = "button_select"
|
||||
const val KEY_BUTTON_START = "button_start"
|
||||
const val KEY_BUTTON_HOME = "button_home"
|
||||
const val KEY_BUTTON_TURBO = "button_turbo"
|
||||
const val KEY_BUTTON_UP = "button_up"
|
||||
const val KEY_BUTTON_DOWN = "button_down"
|
||||
const val KEY_BUTTON_LEFT = "button_left"
|
||||
@ -150,7 +151,8 @@ class Settings {
|
||||
KEY_BUTTON_Y,
|
||||
KEY_BUTTON_SELECT,
|
||||
KEY_BUTTON_START,
|
||||
KEY_BUTTON_HOME
|
||||
KEY_BUTTON_HOME,
|
||||
KEY_BUTTON_TURBO
|
||||
)
|
||||
val buttonTitles = listOf(
|
||||
R.string.button_a,
|
||||
@ -159,7 +161,8 @@ class Settings {
|
||||
R.string.button_y,
|
||||
R.string.button_select,
|
||||
R.string.button_start,
|
||||
R.string.button_home
|
||||
R.string.button_home,
|
||||
R.string.button_turbo
|
||||
)
|
||||
val circlePadKeys = listOf(
|
||||
KEY_CIRCLEPAD_AXIS_VERTICAL,
|
||||
@ -245,4 +248,4 @@ class Settings {
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -123,6 +123,7 @@ class InputBindingSetting(
|
||||
Settings.KEY_BUTTON_SELECT -> NativeLibrary.ButtonType.BUTTON_SELECT
|
||||
Settings.KEY_BUTTON_START -> NativeLibrary.ButtonType.BUTTON_START
|
||||
Settings.KEY_BUTTON_HOME -> NativeLibrary.ButtonType.BUTTON_HOME
|
||||
Settings.KEY_BUTTON_TURBO -> NativeLibrary.ButtonType.BUTTON_TURBO
|
||||
Settings.KEY_BUTTON_UP -> NativeLibrary.ButtonType.DPAD_UP
|
||||
Settings.KEY_BUTTON_DOWN -> NativeLibrary.ButtonType.DPAD_DOWN
|
||||
Settings.KEY_BUTTON_LEFT -> NativeLibrary.ButtonType.DPAD_LEFT
|
||||
|
||||
@ -39,7 +39,7 @@ enum ButtonType {
|
||||
N3DS_TRIGGER_L = 773,
|
||||
N3DS_TRIGGER_R = 774,
|
||||
N3DS_BUTTON_DEBUG = 781,
|
||||
N3DS_BUTTON_GPIO14 = 782
|
||||
N3DS_BUTTON_GPIO14 = 782,
|
||||
N3DS_BUTTON_TURBO = 783
|
||||
};
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user