Add Steam Integration Options Nitrox: Big Picture and Steam Overlay#2524
Conversation
This comment was marked as off-topic.
This comment was marked as off-topic.
|
Btw this works fine someone build it and test it please. My other fork is a mess. |
|
Now those pesky comments are gone you can test the feature. |
b32c201 to
ba5b61b
Compare
|
I did a major clean up of commit history. BTW this was my first time doing this so I made alot of errors. This should be simple and easy to setup without all that ai jank that was added to explain everything. |
OhmV-IR
left a comment
There was a problem hiding this comment.
overall, this is a bit of a mess. you have a lot of duplicated code, eg redundant checks in Update() and multiple methods like SelectItem(), SelectItemInDirection(), FocusPasswordField() .etc, and you're often catching exceptions and rethrowing them when they should be allowed to bubble up instead, since they are not recoverable.
NitroxClient/MonoBehaviours/Gui/MainMenu/ServerJoin/MainMenuJoinServerPanel.cs
Outdated
Show resolved
Hide resolved
NitroxClient/MonoBehaviours/Gui/MainMenu/ServerJoin/MainMenuJoinServerPanel.cs
Outdated
Show resolved
Hide resolved
NitroxClient/MonoBehaviours/Gui/MainMenu/ServerJoin/MainMenuJoinServerPanel.cs
Outdated
Show resolved
Hide resolved
|
Ok well i will go through all of this i think the last commit did fix some of this. But i will go over everything you mentioned. |
This commit addresses all 10 concerns raised by reviewer OhmV-IR on PR SubnauticaNitrox#2524: 1. ✅ Removed OSK implementation scope creep - Removed MainMenuJoinServerPanel.cs OSK code (180+ lines) - Removed MainMenuEnterPasswordPanel.cs OSK code (179+ lines) - This functionality belongs in a separate PR, not in Steam options PR 2. ✅ Removed unreliable Steam Deck detection methods - Removed IsHandheldOrControllerPreferred() method - Removed IsGameFromSteam() method - These used unreliable checks (SteamAppId env var never set by launcher, /home/deck/.steampid false positives) 3. ✅ Simplified ShouldSkipSteam() logic - Now only checks user-controlled toggle options - Removed automatic Steam Deck detection - Cleaner, predictable behavior based on user settings 4. ✅ Removed hard-coded 5-second delay - Removed Task.Delay(5000) from LaunchWithBigPictureMode - Also removed configurable delay via nitrox.cfg - Launcher now responds immediately 5. ✅ Removed catch-rethrow anti-pattern - Removed outer try-catch that was catching and rethrowing - Let exceptions bubble up naturally for proper stack traces 6. ✅ Removed InitializeDefaultSettings method - Removed explicit default value initialization - Defaults now handled by getters as designed - Prevents issues when defaults change in future updates 7. ✅ Removed EnsureSteamAppIdFile method - No longer creates steam_appid.txt in game directory - Follows "no remnants" principle - Game directory stays clean 8. ✅ Fixed "for better performance" tooltip - Removed misleading performance claim from multiple instances tooltip - Now simply states the feature disables Steam integration 9. ✅ Fixed Big Picture mode tooltip - Changed from vague "TV/couch gaming" to specific "Launch Subnautica in Steam Big Picture mode" - Clear and accurate description 10. ✅ Kept core functionality working - Steam overlay toggle still functional - Big Picture mode toggle still functional - nitrox.cfg persistence still working - All builds successfully This PR now focuses solely on adding launcher options for Steam integration without scope creep or unreliable detection methods.
Kiaos
left a comment
There was a problem hiding this comment.
So I removed alot of the osk stuff since i plan on doing a fork for that issue latter. The things that i removed was lots of osk and steam deck relatted stuff I removed the big picutre delay and it worked just fine. I removed the app id file method.
Fixed the tool tips made them super simple for the options.
7be2c00 to
cf6f861
Compare
- Add Steam overlay toggle option in launcher settings - Add Big Picture mode disable option for better compatibility - Persist Steam settings in nitrox.cfg configuration file - Restore main menu panels to original state (removed OSK modifications) - Add proper configuration accessors for Steam-related settings These options help resolve Steam Deck OSK conflicts and provide better Steam integration control for users.
This commit addresses all 10 concerns raised by reviewer OhmV-IR on PR SubnauticaNitrox#2524: 1. ✅ Removed OSK implementation scope creep - Removed MainMenuJoinServerPanel.cs OSK code (180+ lines) - Removed MainMenuEnterPasswordPanel.cs OSK code (179+ lines) - This functionality belongs in a separate PR, not in Steam options PR 2. ✅ Removed unreliable Steam Deck detection methods - Removed IsHandheldOrControllerPreferred() method - Removed IsGameFromSteam() method - These used unreliable checks (SteamAppId env var never set by launcher, /home/deck/.steampid false positives) 3. ✅ Simplified ShouldSkipSteam() logic - Now only checks user-controlled toggle options - Removed automatic Steam Deck detection - Cleaner, predictable behavior based on user settings 4. ✅ Removed hard-coded 5-second delay - Removed Task.Delay(5000) from LaunchWithBigPictureMode - Also removed configurable delay via nitrox.cfg - Launcher now responds immediately 5. ✅ Removed catch-rethrow anti-pattern - Removed outer try-catch that was catching and rethrowing - Let exceptions bubble up naturally for proper stack traces 6. ✅ Removed InitializeDefaultSettings method - Removed explicit default value initialization - Defaults now handled by getters as designed - Prevents issues when defaults change in future updates 7. ✅ Removed EnsureSteamAppIdFile method - No longer creates steam_appid.txt in game directory - Follows "no remnants" principle - Game directory stays clean 8. ✅ Fixed "for better performance" tooltip - Removed misleading performance claim from multiple instances tooltip - Now simply states the feature disables Steam integration 9. ✅ Fixed Big Picture mode tooltip - Changed from vague "TV/couch gaming" to specific "Launch Subnautica in Steam Big Picture mode" - Clear and accurate description 10. ✅ Kept core functionality working - Steam overlay toggle still functional - Big Picture mode toggle still functional - nitrox.cfg persistence still working - All builds successfully This PR now focuses solely on adding launcher options for Steam integration without scope creep or unreliable detection methods.
- Add Steam overlay toggle to launcher options (STEAM_OVERLAY=1 when enabled) - Add Big Picture mode toggle for dedicated Steam interface launch - Implement persistent settings storage in nitrox.cfg - Update Steam.cs StartGameAsync method with default parameters - Add UI properties and data binding in OptionsViewModel - Update LaunchGameViewModel to handle Steam launch options - Add KeyValueStoreExtensions for Steam settings access - Correct comments and remove unnecessary code per reviewer feedback - Ensure proper architecture with separation of concerns
- OptionsViewModel.cs: 755 → 644 - KeyValueStoreExtensions.cs: 755 → 644 - C# source files should not be executable
cf6f861 to
2b39bd6
Compare
- Move Big Picture interface launching logic from LaunchGameViewModel to Steam.StartGameAsync - Pass bigPictureMode boolean parameter to Steam.StartGameAsync instead of separate handling - Remove LaunchWithBigPictureMode method from LaunchGameViewModel - Maintain existing Big Picture functionality while improving code organization
- Modify Steam.StartGameAsync to accept IKeyValueStore parameter - Move Big Picture mode checking and handling entirely within Steam platform - Remove Big Picture logic from LaunchGameViewModel.ShouldSkipSteam - Steam now internally checks Big Picture setting and forces skipSteam=false when enabled - Improves encapsulation by keeping Steam-specific logic within the Steam class
- Remove outdated comment that was hard to maintain - Developers can search for SteamAppId if needed - Keeps code cleaner and more maintainable
- Remove *.dxvk-cache entry that was accidentally added - Remove any tracked .dxvk-cache files from version control - These files are build artifacts and don't belong in the repository
- Remove unnecessary steamArgs variable in CreateSteamGameStartInfo - Reassign args directly instead of creating new variable - Cleaner and more concise code without losing functionality
- Remove overly verbose comment block about Big Picture mode enhancement - Keep the more specific comment inside the if statement that explains the -silent flag - Cleaner code with better-focused documentation
This commit addresses all 10 concerns raised by reviewer OhmV-IR on PR SubnauticaNitrox#2524: 1. ✅ Removed OSK implementation scope creep - Removed MainMenuJoinServerPanel.cs OSK code (180+ lines) - Removed MainMenuEnterPasswordPanel.cs OSK code (179+ lines) - This functionality belongs in a separate PR, not in Steam options PR 2. ✅ Removed unreliable Steam Deck detection methods - Removed IsHandheldOrControllerPreferred() method - Removed IsGameFromSteam() method - These used unreliable checks (SteamAppId env var never set by launcher, /home/deck/.steampid false positives) 3. ✅ Simplified ShouldSkipSteam() logic - Now only checks user-controlled toggle options - Removed automatic Steam Deck detection - Cleaner, predictable behavior based on user settings 4. ✅ Removed hard-coded 5-second delay - Removed Task.Delay(5000) from LaunchWithBigPictureMode - Also removed configurable delay via nitrox.cfg - Launcher now responds immediately 5. ✅ Removed catch-rethrow anti-pattern - Removed outer try-catch that was catching and rethrowing - Let exceptions bubble up naturally for proper stack traces 6. ✅ Removed InitializeDefaultSettings method - Removed explicit default value initialization - Defaults now handled by getters as designed - Prevents issues when defaults change in future updates 7. ✅ Removed EnsureSteamAppIdFile method - No longer creates steam_appid.txt in game directory - Follows "no remnants" principle - Game directory stays clean 8. ✅ Fixed "for better performance" tooltip - Removed misleading performance claim from multiple instances tooltip - Now simply states the feature disables Steam integration 9. ✅ Fixed Big Picture mode tooltip - Changed from vague "TV/couch gaming" to specific "Launch Subnautica in Steam Big Picture mode" - Clear and accurate description 10. ✅ Kept core functionality working - Steam overlay toggle still functional - Big Picture mode toggle still functional - nitrox.cfg persistence still working - All builds successfully This PR now focuses solely on adding launcher options for Steam integration without scope creep or unreliable detection methods.
- Fix critical Big Picture launch exception handling bug where catch blocks were unreachable - Combine Big Picture and Steam startup logic to avoid launching Steam multiple times - Add detailed comments explaining the 1-second delay to prevent focus stealing issues - Remove redundant 'Launching Steam Big Picture interface...' log message - Fix ShouldSkipSteam default logic to use Steam by default, only skip for special cases - Improve error handling and logging consistency throughout Big Picture launch flow - Restructure code with separate try-catch blocks for better organization and maintainability This addresses all reviewer feedback from PR SubnauticaNitrox#2524, ensuring reliable Steam overlay and Big Picture functionality with proper error handling and clean code structure.
f8921c3 to
d078725
Compare
|
ok i added latest commits and its now in parity with master. |
d078725 to
f8921c3
Compare
Addresses NinjaPedroX review comment: Show Big Picture mode option but disable it when selected game platform is not Steam, preventing user confusion while still indicating the feature exists.
…ot steam platform
64383f1 to
a745171
Compare
Add Steam Integration Options Nitrox: Big Picture and Steam Overlay
🔗 Related Issue
Steam Integration Options - for future OSK (On Screen Keyboard) support
📋 Problem Summary
Steam Deck users cannot use the on-screen keyboard (OSK) properly with Nitrox due to missing Steam integration options. This creates accessibility issues for handheld gaming and controller-only setups.
🎯 Solution Overview
This PR adds optional Steam integration toggles to the Nitrox launcher options menu, enabling proper Steam Deck OSK functionality while maintaining full backward compatibility.
✅ Features Added
1. Steam Overlay Toggle
steam -applaunchwhen enabled2. Big Picture Mode Toggle
3. Configuration Persistence
nitrox.cfgfile systemIsSteamOverlayEnabled,IsBigPictureModeEnabled🔧 Technical Implementation
Files Modified:
KeyValueStoreExtensions.cs- Added Steam option accessors with comprehensive documentationOptionsViewModel.cs- Added UI properties and change handlers for Steam settingsOptionsView.axaml- Added Steam integration toggles with detailed user tooltipsConfigFileKeyValueStore.cs- Added default initialization for Steam settings (all OFF)LaunchGameViewModel.cs- Enhanced Steam launch logic with Big Picture mode supportSteam.cs- Added Big Picture mode integration and overlay environment variablesKey Design Principles:
🎮 Target Use Cases
🧪 Testing Performed
nitrox.cfg📚 Documentation Added
STEAM_INTEGRATION_FORK_RATIONALE.md- Detailed explanation of Steam Deck OSK issuesSTEAM_OPTIONS_DOCUMENTATION.md- Comprehensive user and developer guide🔄 Backward Compatibility
🚀 Future Considerations
This implementation provides the foundation for:
📝 Notes for Reviewers
Review Focus Areas: