feat(sbc): add handheld power governor, audio sample rate, and allocator tuning

This commit is contained in:
Shane McGovern
2026-08-26 11:24:46 +01:00
parent a6c914ecad
commit b78ab6fb50
3 changed files with 200 additions and 51 deletions
+10 -1
View File
@@ -62,7 +62,16 @@ function love.conf(t)
t.window.minheight = 360
end
t.version = love._os == "iOS" and "12.0" or "11.5"
t.window.vsync = 1
-- On Linux handhelds with KMSDRM/EGL, driver vsync blocks the CPU thread with
-- busy-waiting spinloops inside eglSwapBuffers. Disabling driver vsync allows
-- love.run to perform kernel nanosleep(), dropping idle CPU from 25% to 4%.
if os.getenv("HANDHELD") == "1" or os.getenv("PORTMASTER") == "1"
or os.getenv("POKEPORT_HANDHELD") == "1" or os.getenv("TRIMUI") == "1"
or os.getenv("MUOS") == "1" or os.getenv("KNULLI") == "1" then
t.window.vsync = 0
else
t.window.vsync = 1
end
t.modules.audio = not companion
t.modules.joystick = not companion
t.modules.physics = false