feat: further kernel power and power optimizations
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user