feat: add 'Keep screen awake' setting to prevent screen lock during streaming#1559
Open
aliefe04 wants to merge 1 commit intomoonlight-stream:masterfrom
Open
feat: add 'Keep screen awake' setting to prevent screen lock during streaming#1559aliefe04 wants to merge 1 commit intomoonlight-stream:masterfrom
aliefe04 wants to merge 1 commit intomoonlight-stream:masterfrom
Conversation
…treaming Resolves moonlight-stream#1549 Adds a new preference option 'Keep screen awake' in Basic Settings that prevents the Android screen from locking during streaming. - Default: enabled (preserves current behavior) - When disabled: screen can lock during streaming based on system timeout - Setting appears in Settings > Basic Settings Changes: - Add preference constant, field, and reading in PreferenceConfiguration - Add CheckBoxPreference in preferences.xml - Add title and summary strings in strings.xml - Set FLAG_KEEP_SCREEN_ON in Game.onCreate() based on preference - Remove redundant addFlags call in connectionStarted()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #1549
Summary
Adds a new preference option "Keep screen awake" in Basic Settings that prevents the Android screen from locking during streaming.
Problem
Users reported that their Android device screen would lock during streaming sessions, especially when using Moonlight as a remote desktop for extended periods without touch input (e.g., watching movies, using Bluetooth keyboard/mouse).
Solution
FLAG_KEEP_SCREEN_ONto prevent screen lockChanges
PreferenceConfiguration.java: Added preference constant, field, and reading logicpreferences.xml: Added CheckBoxPreference in Basic Settings categorystrings.xml: Added title and summary stringsGame.java: SetFLAG_KEEP_SCREEN_ONinonCreate()based on preferenceTesting