From 6c6c1294e29d1a9a34db28535d8e37693b9e6972 Mon Sep 17 00:00:00 2001 From: DacoTaco Date: Sun, 29 Nov 2026 13:34:49 +0100 Subject: [PATCH] EXI: dont wait for 300ms for already connected devices to settle on application start --- libogc/exi.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/libogc/exi.c b/libogc/exi.c index e0ea94b6..4b973a5d 100644 --- a/libogc/exi.c +++ b/libogc/exi.c @@ -838,6 +838,21 @@ void EXI_ProbeReset(void) __exi_probe(0); __exi_probe(1); + + //kinda hack because there are no system globals to store this information + //after a reset the devices usually already have settled, so they dont need the 300ms wait + for(unsigned i = 0; i < EXI_CHANNEL_2; i++) + { + if(last_exi_idtime[i]==0) + continue; + + u64 ticks = PPCMsToTicks(300) - PPCNsToTicks(300); + // avoid 0, which is not found + if(last_exi_idtime[i] == ticks) + last_exi_idtime[i] = 1; + else + last_exi_idtime[i] -= ticks; + } } void __exi_init(void)