Init Order: call 'mg_InitTimer' before call 'SystemThreads'

This commit is contained in:
xueshuming
2025-05-27 15:45:03 +08:00
parent b7525f3001
commit 2791dc99ef

View File

@@ -562,6 +562,13 @@ int GUIAPI InitGUI (int args, const char *agr[])
_is_minigui_running = 1;
/* init timer for tick counter */
step++;
if (!mg_InitTimer()) {
_ERR_PRINTF ("KERNEL>InitGUI: failed to start time counter\n");
goto failure;
}
step++;
if (!SystemThreads()) {
_ERR_PRINTF ("KERNEL>InitGUI: failed to init system threads!\n");
@@ -575,13 +582,6 @@ int GUIAPI InitGUI (int args, const char *agr[])
goto failure;
}
/* init timer for tick counter */
step++;
if (!mg_InitTimer()) {
_ERR_PRINTF ("KERNEL>InitGUI: failed to start time counter\n");
goto failure;
}
SetKeyboardLayout ("default");
SetCursor (GetSystemCursor (IDC_ARROW));