feat(videoout): keep the host screen awake while a title runs #17347
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/17347"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-08T18:24:46Z.
What
Keeps the host screen saver and display sleep off while a title runs, through SDL's own default. SDL 2 disables the screen saver when its video subsystem starts and main never allows it back, so the default stays as it is.
ANYPS5_KEEP_AWAKE=0is the opt-out: inVideoOutDriver.cppit setsSDL_VIDEO_ALLOW_SCREENSAVER=1before SDL's video subsystem starts, so the host screen saver can run. Unset or any other value keeps SDL's default.Reduction from the earlier version of this PR: the
HostKeepAwakeholder, its SDL backend, the refused-hold logging, the display window hooks, the test and the CMake lines are gone. That version took an explicitSDL_DisableScreenSaverhold on window create and released it on destroy; it duplicated SDL's default, so it is removed. No host where the screen sleeps on main has been named or measured, so none is claimed here. The only remaining behaviour is the opt-out.Scope: libSceVideoOut
VideoOutDriver.cpp, one row in the environment reference, and one debt fragment,docs/dev/debt/changes/feat-host-keep-screen-awake.md, for the platforms that were not checked. Net change againstorigin/main: those three files. The earlier feature commits remain in the branch history; the reduction is90c5e0cc99and the debt fragment is1a7634ca14.Tested
On the head
1a7634ca14, againstorigin/mainbd9a6c00a6:python3 tools/check_conventions.py --base origin/main: passed.git diff --check origin/main...HEAD: clean.python3 tools/debt_fold.py --check: passed.core/libs/prx/libSceVideoOut/src/VideoOutDriver.cppwith thebuild-gcc15flags (GCC 15, Release, Windows): exit 0.build-gcc15SDL2 static library (not the test suite):SDL_IsScreenSaverEnabled()returned 0 withANYPS5_KEEP_AWAKEunset, 1 withANYPS5_KEEP_AWAKE=0, and 0 withANYPS5_KEEP_AWAKE=1. This reads SDL's flag after the hint; it does not observe whether the OS screen sleeps.Not run on this head:
guest_video_out_*,pad_keyboard_mouse) were not built. No test covers the new hint line.Overlap: PR #18502 touches
core/libs/prx/libSceVideoOut/CMakeLists.txt; this PR no longer touches CMake, so the two do not overlap there. The earlier body named PR 12863 as overlapping; I did not recheck that on this head. This PR adds one row todocs/dev/ENVIRONMENT.mdand one fragment, so a text conflict is possible there if another PR changes the same table.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)