From 3cc00d3aa9eda2e13ff651d74044351dd5d3f096 Mon Sep 17 00:00:00 2001 From: GearsProgress Date: Mon, 7 Sep 2026 11:22:22 -0400 Subject: [PATCH] Fixing intro crash and graphics --- source/link_handler.cpp | 28 ++++++++++++++++++++++++++++ source/main.cpp | 1 + 2 files changed, 29 insertions(+) diff --git a/source/link_handler.cpp b/source/link_handler.cpp index 058c367..e4751a9 100644 --- a/source/link_handler.cpp +++ b/source/link_handler.cpp @@ -1257,6 +1257,10 @@ bool LinkConnection::LinkCommand_InitalizeConnection(bool waitForCompletion) { return true; } + else if (!linkSPI->isActive()) + { + return false; + } PTGB_MGBA_INFO("Running command: InitalizeConnection"); @@ -1276,6 +1280,10 @@ bool LinkConnection::LinkCommand_ReloadCurrentBox(bool waitForCompletion) { return true; } + else if (!linkSPI->isActive()) + { + return false; + } PTGB_MGBA_INFO("Running command: ReloadCurrentBox"); @@ -1297,6 +1305,10 @@ bool LinkConnection::LinkCommand_TransferPokemon(int boxNumber, byte removalArra { return true; } + else if (!linkSPI->isActive()) + { + return false; + } int maxBoxes = 0; if (gen == 1) @@ -1350,6 +1362,10 @@ bool LinkConnection::LinkCommand_SoftReset(bool waitForCompletion) { return true; } + else if (!linkSPI->isActive()) + { + return false; + } PTGB_MGBA_INFO("Running command: SoftReset"); @@ -1371,6 +1387,10 @@ bool LinkConnection::LinkCommand_ModifySRAMAccess(bool enableSRAM, byte SRAMbank { return true; } + else if (!linkSPI->isActive()) + { + return false; + } if (SRAMbank > 3) { @@ -1404,6 +1424,10 @@ bool LinkConnection::LinkCommand_RunSecondaryPayload(byte payload[], int payload { return true; } + else if (!linkSPI->isActive()) + { + return false; + } PTGB_MGBA_INFO("Running command: RunSecondaryPayload"); @@ -1426,6 +1450,10 @@ bool LinkConnection::LinkCommand_ReadMemorySection(u32 dataPointer, byte outArra { return true; } + else if (!linkSPI->isActive()) + { + return false; + } if (dataPointer > 0xFFFF) { diff --git a/source/main.cpp b/source/main.cpp index 5658a51..8d71a76 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -438,6 +438,7 @@ int main(void) if (!get_tutorial_flag() || g_debug_options.force_tutorial) { obj_hide_multi(ptgb_logo_l, 2); + load_flex_background(FBG_Fennel, 2); text_loop(BTN_TRANSFER); initialize_save_data(); // TODO: We should be able to test for a Bootleg rom in here- if the save data isn't written, then it is bootleg.