feat: further kernel power and power optimizations

This commit is contained in:
2026-04-21 20:51:12 +02:00
parent d1fffecff6
commit 0dfb3e8dbb
31 changed files with 895 additions and 52 deletions
+5 -5
View File
@@ -551,6 +551,7 @@ bool desktop_poll_external_windows(DesktopState* ds) {
void gui::desktop_run(DesktopState* ds) {
uint64_t lastClockToken = 0;
uint64_t lastLauncherBlinkToken = ~0ull;
uint64_t inputSerial = montauk::input_wait(0, 0);
bool firstFrame = true;
for (;;) {
@@ -628,11 +629,10 @@ void gui::desktop_run(DesktopState* ds) {
firstFrame = false;
}
if (desktop_has_active_interaction(ds)) {
montauk::sleep_ms(1);
} else {
montauk::sleep_ms(sceneChanged ? 4 : 16);
}
uint64_t waitMs = (desktop_has_active_interaction(ds) || mouseChanged || keyboardChanged)
? 1
: (sceneChanged ? 4 : 16);
inputSerial = montauk::input_wait(inputSerial, waitMs);
}
}