aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxbzk <xbzk@eden-emu.dev>2025-10-01 00:10:59 +0200
committercrueter <crueter@eden-emu.dev>2025-10-01 00:10:59 +0200
commitdfca07f4e3df72b243828268d0a3c4a49279ff9f (patch)
treec3d7c2c866643cd4b495e2548e61cb5515970cef
parent2e0a4163cf55fea260d641600b5a1452da27d373 (diff)
Initial a9 (minsdk=28) support (#2600)
Minimal changes to make android 10 installable and emulationFragment not immediately crashable. Testers (mainly android 10) NEEDED!!! Co-authored-by: Allison Cunha <allisonbzk@gmail.com> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2600 Reviewed-by: Lizzie <lizzie@eden-emu.dev> Co-authored-by: xbzk <xbzk@eden-emu.dev> Co-committed-by: xbzk <xbzk@eden-emu.dev>
-rw-r--r--src/android/app/build.gradle.kts2
-rw-r--r--src/android/app/src/main/java/org/yuzu/yuzu_emu/views/CarouselRecyclerView.kt5
-rw-r--r--src/common/host_memory.cpp10
3 files changed, 14 insertions, 3 deletions
diff --git a/src/android/app/build.gradle.kts b/src/android/app/build.gradle.kts
index d3a05cf3e2..e8d8141711 100644
--- a/src/android/app/build.gradle.kts
+++ b/src/android/app/build.gradle.kts
@@ -59,7 +59,7 @@ android {
defaultConfig {
// TODO If this is ever modified, change application_id in strings.xml
applicationId = "dev.eden.eden_emulator"
- minSdk = 30
+ minSdk = 28
targetSdk = 36
versionName = getGitVersion()
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/views/CarouselRecyclerView.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/views/CarouselRecyclerView.kt
index 8a66ebf11f..2c35e7349a 100644
--- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/views/CarouselRecyclerView.kt
+++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/views/CarouselRecyclerView.kt
@@ -19,6 +19,7 @@ import org.yuzu.yuzu_emu.adapters.GameAdapter
import androidx.core.view.doOnNextLayout
import org.yuzu.yuzu_emu.YuzuApplication
import androidx.preference.PreferenceManager
+import androidx.core.view.WindowInsetsCompat
/**
* CarouselRecyclerView encapsulates all carousel logic for the games UI.
@@ -205,8 +206,8 @@ class CarouselRecyclerView @JvmOverloads constructor(
if (enabled) {
useCustomDrawingOrder = true
- val insets = rootWindowInsets
- val bottomInset = insets?.getInsets(android.view.WindowInsets.Type.systemBars())?.bottom ?: 0
+ val insets = rootWindowInsets?.let { WindowInsetsCompat.toWindowInsetsCompat(it, this) }
+ val bottomInset = insets?.getInsets(WindowInsetsCompat.Type.systemBars())?.bottom ?: 0
val internalFactor = resources.getFraction(R.fraction.carousel_card_size_factor, 1, 1)
val userFactor = preferences.getFloat(CAROUSEL_CARD_SIZE_FACTOR, internalFactor).coerceIn(
0f,
diff --git a/src/common/host_memory.cpp b/src/common/host_memory.cpp
index 2e36d59569..3838c12903 100644
--- a/src/common/host_memory.cpp
+++ b/src/common/host_memory.cpp
@@ -56,6 +56,16 @@
#include "common/host_memory.h"
#include "common/logging/log.h"
+#if defined(__ANDROID__) && __ANDROID_API__ < 30
+#include <sys/syscall.h>
+#ifndef MFD_CLOEXEC
+#define MFD_CLOEXEC 0x0001U
+#endif
+static int memfd_create(const char* name, unsigned int flags) {
+ return syscall(__NR_memfd_create, name, flags);
+}
+#endif
+
namespace Common {
constexpr size_t PageAlignment = 0x1000;