mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2026-04-08 18:31:29 -06:00
Reduce debounce timer + Remove magic number
This commit is contained in:
parent
db09c2c9e9
commit
11b99da1e6
@ -148,7 +148,7 @@ class ControllerQuickConfigDialog(
|
||||
private fun onKeyEvent(event: KeyEvent): Boolean {
|
||||
return when (event.action) {
|
||||
KeyEvent.ACTION_UP -> {
|
||||
if (System.currentTimeMillis()-debounceTimestamp < 500) {
|
||||
if (System.currentTimeMillis()-debounceTimestamp < DEBOUNCE_TIMER) {
|
||||
return true
|
||||
}
|
||||
|
||||
@ -224,4 +224,8 @@ class ControllerQuickConfigDialog(
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val DEBOUNCE_TIMER = 100
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user