rosalina: add "time to boot to HM" in debug menu

This commit is contained in:
TuxSH 2022-04-05 18:33:12 +01:00
parent c71474a668
commit 3463effeae

View File

@ -88,6 +88,13 @@ void RosalinaMenu_ShowDebugInfo(void)
u32 kernelVer = osGetKernelVersion(); u32 kernelVer = osGetKernelVersion();
FS_SdMmcSpeedInfo speedInfo; FS_SdMmcSpeedInfo speedInfo;
Handle hm = 0;
OpenProcessByName("menu", &hm);
s64 out = 0;
svcGetHandleInfo(&out, hm, 0);
svcCloseHandle(hm);
u64 timeToBootHm = 1000u * out / SYSCLOCK_ARM11;
do do
{ {
Draw_Lock(); Draw_Lock();
@ -123,6 +130,13 @@ void RosalinaMenu_ShowDebugInfo(void)
(int)speedInfo.highSpeedModeEnabled, SYSCLOCK_SDMMC / (1000 * clkDiv) (int)speedInfo.highSpeedModeEnabled, SYSCLOCK_SDMMC / (1000 * clkDiv)
); );
} }
if (timeToBootHm != 0)
{
posY = Draw_DrawFormattedString(
10, posY, COLOR_WHITE, "Time to boot to Home Menu: %llums\n",
timeToBootHm
);
}
Draw_FlushFramebuffer(); Draw_FlushFramebuffer();
Draw_Unlock(); Draw_Unlock();
} }