diff --git a/source/link_handler.cpp b/source/link_handler.cpp index ec5b0b3..34bda48 100644 --- a/source/link_handler.cpp +++ b/source/link_handler.cpp @@ -1258,6 +1258,10 @@ bool LinkConnection::LinkCommand_InitalizeConnection(bool waitForCompletion) { return true; } + else if (!linkSPI->isActive()) + { + return false; + } PTGB_MGBA_INFO("Running command: InitalizeConnection"); @@ -1277,6 +1281,10 @@ bool LinkConnection::LinkCommand_ReloadCurrentBox(bool waitForCompletion) { return true; } + else if (!linkSPI->isActive()) + { + return false; + } PTGB_MGBA_INFO("Running command: ReloadCurrentBox"); @@ -1298,6 +1306,10 @@ bool LinkConnection::LinkCommand_TransferPokemon(int boxNumber, byte removalArra { return true; } + else if (!linkSPI->isActive()) + { + return false; + } int maxBoxes = 0; if (gen == 1) @@ -1351,6 +1363,10 @@ bool LinkConnection::LinkCommand_SoftReset(bool waitForCompletion) { return true; } + else if (!linkSPI->isActive()) + { + return false; + } PTGB_MGBA_INFO("Running command: SoftReset"); @@ -1372,6 +1388,10 @@ bool LinkConnection::LinkCommand_ModifySRAMAccess(bool enableSRAM, byte SRAMbank { return true; } + else if (!linkSPI->isActive()) + { + return false; + } if (SRAMbank > 3) { @@ -1405,6 +1425,10 @@ bool LinkConnection::LinkCommand_RunSecondaryPayload(byte payload[], int payload { return true; } + else if (!linkSPI->isActive()) + { + return false; + } PTGB_MGBA_INFO("Running command: RunSecondaryPayload"); @@ -1427,6 +1451,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 1d735c3..0bbfd0f 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -437,6 +437,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.