-
Notifications
You must be signed in to change notification settings - Fork 47
fix: Gracefully handle steam as underlay in overlay mode via launch options #531
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
KyleGospo
wants to merge
5
commits into
ShadowBlip:main
Choose a base branch
from
KyleGospo:overlay-tdp-fix
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
410c3bf
fix: Disable TDP control when launched with --steamos-manager, this c…
KyleGospo 1eb74d5
fix: Respect user-set controller at boot
KyleGospo 887d6b1
feat: Emulate deck-uhid by default when launched with --steam-input
KyleGospo d629a69
fix: Disable per-game controller switching when launched with --steam…
KyleGospo 2553b57
feat: Allow a platform to override the default target gamepad
KyleGospo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| extends GutTest | ||
|
|
||
|
|
||
| # Test that the default input manager makes no assumptions about the target | ||
| # gamepad, leaving whatever target InputPlumber already configured in place. | ||
| func test_get_default_target_gamepad() -> void: | ||
| var input_manager := InputManager.new() | ||
| assert_eq(input_manager.get_default_target_gamepad(), "", "should not default to any target gamepad") | ||
| input_manager.free() | ||
|
|
||
|
|
||
| # Test that overlay mode only assumes a target gamepad when Steam Input is in | ||
| # use, so games running under Steam see the same controller they would on a | ||
| # Deck while other sessions keep whatever is already configured. | ||
| func test_get_default_target_gamepad_overlay_mode() -> void: | ||
| var launch_manager := load("res://core/global/launch_manager.tres") as LaunchManager | ||
| var platform := load("res://core/global/platform.tres") as Platform | ||
| var was_steam_input := launch_manager.steam_input_enabled | ||
| var was_platform := platform.platform | ||
| var input_manager := OverlayInputManager.new() | ||
| platform.platform = null | ||
|
|
||
| launch_manager.steam_input_enabled = false | ||
| assert_eq(input_manager.get_default_target_gamepad(), "", "should not default to any target gamepad without Steam Input") | ||
|
|
||
| launch_manager.steam_input_enabled = true | ||
| assert_eq(input_manager.get_default_target_gamepad(), "deck-uhid", "should default to the Steam Deck target gamepad under Steam Input") | ||
|
|
||
| platform.platform = was_platform | ||
| launch_manager.steam_input_enabled = was_steam_input | ||
| input_manager.free() | ||
|
|
||
|
|
||
| # Test that a platform can override the default target gamepad. Devices without | ||
| # a dedicated Quick Access Menu button need this, as Steam ignores the guide | ||
| # button chords on the Steam Deck target and leaves no way to open the QAM. | ||
| func test_get_default_target_gamepad_platform_override() -> void: | ||
| var launch_manager := load("res://core/global/launch_manager.tres") as LaunchManager | ||
| var platform := load("res://core/global/platform.tres") as Platform | ||
| var was_steam_input := launch_manager.steam_input_enabled | ||
| var was_platform := platform.platform | ||
| var input_manager := OverlayInputManager.new() | ||
|
|
||
| var provider := PlatformProvider.new() | ||
| provider.target_gamepad_override = "xbox-elite" | ||
| platform.platform = provider | ||
|
|
||
| launch_manager.steam_input_enabled = true | ||
| assert_eq(input_manager.get_default_target_gamepad(), "xbox-elite", "should use the target gamepad the platform asked for") | ||
|
|
||
| launch_manager.steam_input_enabled = false | ||
| assert_eq(input_manager.get_default_target_gamepad(), "", "should not default to any target gamepad without Steam Input") | ||
|
|
||
| platform.platform = was_platform | ||
| launch_manager.steam_input_enabled = was_steam_input | ||
| input_manager.free() |
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.