Merge pull request #1786 from 1Jamie/more-android-lc

fix(android): keep Gen1 Game.load after in-process EXIT GAME
This commit is contained in:
bryanthaboi
2026-08-25 08:10:21 -04:00
committed by GitHub
6 changed files with 79 additions and 17 deletions
+8 -1
View File
@@ -384,7 +384,14 @@ function bootGame(version, cartId)
Game = require("src.core.Game2").new()
Game:load()
else
Game = require("src.core.Game")
-- Gen1 Game is a module singleton. In-process EXIT GAME resets it in
-- place; if a prior teardown left load missing, rebuild from source.
local gameMod = require("src.core.Game")
if type(gameMod.load) ~= "function" then
package.loaded["src.core.Game"] = nil
gameMod = require("src.core.Game")
end
Game = gameMod
Game:load()
if os.getenv("POKEPORT_AUTOPILOT") then
autopilot = require("tests.autopilot")