From 202a2435aac7fadc649d32ec69fbe0540d786eb0 Mon Sep 17 00:00:00 2001 From: Maschell Date: Wed, 5 Jun 2024 18:51:33 +0200 Subject: [PATCH] Make quick starting titles more consistent if selecting the titles takes longer than 5-10 seconds --- source/QuickStartUtils.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/source/QuickStartUtils.cpp b/source/QuickStartUtils.cpp index c76dba6..485b08b 100644 --- a/source/QuickStartUtils.cpp +++ b/source/QuickStartUtils.cpp @@ -132,7 +132,7 @@ public: // Reconnect the DRC if it was connected at launch but then disconnected; if (mDRCConnected && !IsDRCConnected()) { - DEBUG_FUNCTION_LINE_VERBOSE("Wake up GamePad"); + DEBUG_FUNCTION_LINE("Wake up GamePad"); CCRCDCWowlWakeDrcArg args = {.state = 1}; CCRCDCWowlWakeDrc(&args); } @@ -145,14 +145,18 @@ public: } static void AbortQuickStartTitle(OSAlarm *alarm, OSContext *) { - DEBUG_FUNCTION_LINE_VERBOSE("Selecting a title takes too long, lets abort the quick start menu"); + DEBUG_FUNCTION_LINE("Selecting a title takes too long, lets abort the quick start menu"); CCRSysCaffeineBootCheckAbort(); } static void AbortOnDRCDisconnect(OSAlarm *alarm, OSContext *) { if (!IsDRCConnected()) { - DEBUG_FUNCTION_LINE_VERBOSE("GamePad was disconnected, lets abort the quick start menu"); - CCRSysCaffeineBootCheckAbort(); + // The gamepad does reconnect after selecting a title, make sure it's still disconnected after waiting 3 seconds + OSSleepTicks(OSSecondsToTicks(3)); + if (!IsDRCConnected()) { + DEBUG_FUNCTION_LINE("GamePad was disconnected, lets abort the quick start menu"); + CCRSysCaffeineBootCheckAbort(); + } } }