From 18f5f3e164a7316a197dbb46b5e5eed1116bbd29 Mon Sep 17 00:00:00 2001
From: Leon Styhre <leon@leonstyhre.com>
Date: Wed, 10 Jul 2024 17:44:41 +0200
Subject: [PATCH] (Android) Added support for using the %BASENAME% variable
 with the %EXTRA% and %EXTRAARRAY% variables

---
 es-app/src/FileData.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/es-app/src/FileData.cpp b/es-app/src/FileData.cpp
index 1f143c8ac..9e839ad10 100644
--- a/es-app/src/FileData.cpp
+++ b/es-app/src/FileData.cpp
@@ -1879,6 +1879,7 @@ void FileData::launchGame()
                         extraValue =
                             Utils::String::replace(extraValue, "%ROMPATHRAW%", getROMDirectory());
                         extraValue = Utils::String::replace(extraValue, "%ROMRAW%", romRaw);
+                        extraValue = Utils::String::replace(extraValue, "%BASENAME%", baseName);
                         extraValue = Utils::String::replace(extraValue, "//", "/");
 
                         if (variable == "%EXTRA_")