summaryrefslogtreecommitdiffstats
path: root/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/InsetsHelper.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/InsetsHelper.kt')
-rw-r--r--src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/InsetsHelper.kt18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/InsetsHelper.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/InsetsHelper.kt
new file mode 100644
index 000000000..3f9acc5b0
--- /dev/null
+++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/InsetsHelper.kt
@@ -0,0 +1,18 @@
+package org.yuzu.yuzu_emu.utils
+
+import android.content.Context
+
+object InsetsHelper {
+ const val THREE_BUTTON_NAVIGATION = 0
+ const val TWO_BUTTON_NAVIGATION = 1
+ const val GESTURE_NAVIGATION = 2
+
+ fun getSystemGestureType(context: Context): Int {
+ val resources = context.resources
+ val resourceId =
+ resources.getIdentifier("config_navBarInteractionMode", "integer", "android")
+ return if (resourceId != 0) {
+ resources.getInteger(resourceId)
+ } else 0
+ }
+}