feat(android): add adaptive icons, dynamic shortcuts, in-process hot-swap, and exit-to-launcher

This commit is contained in:
1jamie
2026-08-18 20:37:25 -05:00
parent 580449b8df
commit 302b2c9591
45 changed files with 792 additions and 16 deletions
+1
View File
@@ -174,6 +174,7 @@ function Game:makeTitleState()
self:restoreSave(loaded, recovered, { freshBoot = true })
end
end,
onExit = self.onExit,
})
title.screenId = title.screenId or "TitleState"
return title
+1
View File
@@ -318,6 +318,7 @@ function Game2:showMainMenu()
onNewGame = function() self:newGame() end,
onContinue = function(save) self:continueGame(save) end,
onOption = function() self:showOptions(function() self:showMainMenu() end) end,
onExit = self.onExit,
})
end
+13
View File
@@ -67,10 +67,23 @@ local function argFlag(argv, name)
return false
end
local cachedIntentGame = nil
-- Returns version, slotId (either may be nil). Command line wins over env,
-- so a shortcut can override a machine-wide default.
function LaunchOptions.resolve(argv)
if cachedIntentGame == nil then
if love.system and love.system.getOS and love.system.getOS() == "Android"
and love.system.getLaunchGame then
cachedIntentGame = normalizeVersion(love.system.getLaunchGame()) or false
else
cachedIntentGame = false
end
end
local intentGame = cachedIntentGame or nil
local game = normalizeVersion(argValue(argv, "game"))
or intentGame
or normalizeVersion(os.getenv("POKEPORT_GAME"))
or normalizeVersion(os.getenv("POKEPORT_LAUNCH"))
local slot = argValue(argv, "slot") or os.getenv("POKEPORT_SLOT")