Skip to content

Commit 63ba7c7

Browse files
committed
Fix emulator launch intent compatibility for Android 13+
- Add CATEGORY_DEFAULT to FileUri and Custom intent builders for Android 13+ compatibility - Update PPSSPP/PPSSPP Gold to use explicit activity class with correct MIME type - Add GameCube support (gc/ngc) to RetroArch and update Dolphin - Add RetroArch core mapping for GameCube (dolphin core)
1 parent afd7f68 commit 63ba7c7

4 files changed

Lines changed: 21 additions & 10 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,4 @@ Thumbs.db
4444

4545
# Claude Code
4646
.claude/
47+
.plan/

app/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ android {
2222
applicationId = "com.nendo.argosy"
2323
minSdk = 26
2424
targetSdk = 34
25-
versionCode = 9
26-
versionName = "0.5.2"
25+
versionCode = 10
26+
versionName = "0.5.3"
2727

2828
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
2929
vectorDrawables {

app/src/main/kotlin/com/nendo/argosy/data/emulator/EmulatorRegistry.kt

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ object EmulatorRegistry {
5959
packageName = "com.retroarch",
6060
displayName = "RetroArch",
6161
supportedPlatforms = setOf(
62-
"nes", "snes", "n64", "gb", "gbc", "gba", "nds",
62+
"nes", "snes", "n64", "gc", "ngc", "gb", "gbc", "gba", "nds",
6363
"genesis", "sms", "gg", "scd", "32x",
6464
"psx", "psp",
6565
"tg16", "tgcd", "pcfx",
@@ -78,7 +78,7 @@ object EmulatorRegistry {
7878
packageName = "com.retroarch.aarch64",
7979
displayName = "RetroArch (64-bit)",
8080
supportedPlatforms = setOf(
81-
"nes", "snes", "n64", "gb", "gbc", "gba", "nds",
81+
"nes", "snes", "n64", "gc", "ngc", "gb", "gbc", "gba", "nds",
8282
"genesis", "sms", "gg", "scd", "32x",
8383
"psx", "psp",
8484
"tg16", "tgcd", "pcfx",
@@ -104,7 +104,7 @@ object EmulatorRegistry {
104104
id = "dolphin",
105105
packageName = "org.dolphinemu.dolphinemu",
106106
displayName = "Dolphin",
107-
supportedPlatforms = setOf("gc", "wii"),
107+
supportedPlatforms = setOf("gc", "ngc", "wii"),
108108
downloadUrl = "https://play.google.com/store/apps/details?id=org.dolphinemu.dolphinemu"
109109
),
110110
EmulatorDef(
@@ -240,13 +240,21 @@ object EmulatorRegistry {
240240
packageName = "org.ppsspp.ppsspp",
241241
displayName = "PPSSPP",
242242
supportedPlatforms = setOf("psp"),
243+
launchConfig = LaunchConfig.Custom(
244+
activityClass = "org.ppsspp.ppsspp.PpssppActivity",
245+
mimeTypeOverride = "application/octet-stream"
246+
),
243247
downloadUrl = "https://play.google.com/store/apps/details?id=org.ppsspp.ppsspp"
244248
),
245249
EmulatorDef(
246250
id = "ppsspp_gold",
247251
packageName = "org.ppsspp.ppssppgold",
248252
displayName = "PPSSPP Gold",
249253
supportedPlatforms = setOf("psp"),
254+
launchConfig = LaunchConfig.Custom(
255+
activityClass = "org.ppsspp.ppssppgold.PpssppActivity",
256+
mimeTypeOverride = "application/octet-stream"
257+
),
250258
downloadUrl = "https://play.google.com/store/apps/details?id=org.ppsspp.ppssppgold"
251259
),
252260
EmulatorDef(
@@ -354,7 +362,8 @@ object EmulatorRegistry {
354362
"n64" to listOf("mupen64plus_fz", "retroarch", "retroarch_64", "lemuroid"),
355363
"nds" to listOf("drastic", "melonds", "retroarch", "retroarch_64", "lemuroid"),
356364
"3ds" to listOf("lime3ds", "citra", "citra_mmj"),
357-
"gc" to listOf("dolphin"),
365+
"gc" to listOf("dolphin", "retroarch", "retroarch_64"),
366+
"ngc" to listOf("dolphin", "retroarch", "retroarch_64"),
358367
"wii" to listOf("dolphin"),
359368
"switch" to listOf("citron", "ryujinx", "yuzu", "strato", "eden", "skyline"),
360369
"gba" to listOf("pizza_boy_gba", "retroarch", "retroarch_64", "lemuroid"),
@@ -388,6 +397,8 @@ object EmulatorRegistry {
388397
"nes" to "fceumm",
389398
"snes" to "snes9x",
390399
"n64" to "mupen64plus_next",
400+
"gc" to "dolphin",
401+
"ngc" to "dolphin",
391402
"gb" to "gambatte",
392403
"gbc" to "gambatte",
393404
"gba" to "mgba",

app/src/main/kotlin/com/nendo/argosy/data/emulator/GameLauncher.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ class GameLauncher @Inject constructor(
9191
return Intent(emulator.launchAction).apply {
9292
setDataAndType(uri, getMimeType(romFile))
9393
setPackage(emulator.packageName)
94+
addCategory(Intent.CATEGORY_DEFAULT)
9495
addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
95-
// Clear existing task to ensure new ROM loads instead of resuming previous game
9696
addFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK)
9797
}
9898
}
@@ -156,15 +156,15 @@ class GameLauncher @Inject constructor(
156156
setPackage(emulator.packageName)
157157
}
158158

159-
// Only set data for ACTION_VIEW intents, not for ACTION_MAIN
159+
addCategory(Intent.CATEGORY_DEFAULT)
160+
160161
if (emulator.launchAction == Intent.ACTION_VIEW) {
161162
val uri = getFileUri(romFile)
162163
val mimeType = config.mimeTypeOverride ?: getMimeType(romFile)
163164
setDataAndType(uri, mimeType)
164165
addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
165166
}
166167

167-
// If emulator needs absolute path, add it as extras
168168
if (config.useAbsolutePath) {
169169
putExtra("path", romFile.absolutePath)
170170
putExtra("file", romFile.absolutePath)
@@ -181,7 +181,6 @@ class GameLauncher @Inject constructor(
181181
putExtra(key, value)
182182
}
183183

184-
// Clear existing task and top activities to ensure new ROM loads
185184
addFlags(
186185
Intent.FLAG_ACTIVITY_NEW_TASK or
187186
Intent.FLAG_ACTIVITY_CLEAR_TASK or

0 commit comments

Comments
 (0)