This integration adds Steamworks SDK support to pylux, enabling the PlayStation OAuth login flow to open in Steam's overlay instead of a separate browser window.
- Location:
gui/src/steamworks/andgui/include/steamworks/ - Isolation: Completely separate from main codebase
- Minimal Impact: Only touches PSN login button logic
- Merge Safe: Designed to minimize upstream conflicts
gui/
├── src/steamworks/
│ ├── steamworks_api.cpp # Implementation
│ └── README.md # Module documentation
├── include/steamworks/
│ └── steamworks_wrapper.h # Header interface
├── third_party/
│ ├── README_STEAMWORKS.md # Installation guide
│ └── steamworks_sdk/ # SDK placement (you provide)
# Download SDK from Steamworks Partner Portal
# Extract to: gui/third_party/steamworks_sdk/Edit gui/src/steamworks/steamworks_api.cpp:
// TODO: Replace 0 with your actual Steam App ID
if (!steamworks_wrapper->initialize(YOUR_STEAM_APP_ID)) {cmake -DCHIAKI_ENABLE_STEAMWORKS=ON ..
make- User clicks "Login to PSN" in Settings → Config
- Steam Check:
Chiaki.openPsnLoginInSteamOverlay()attempts Steam overlay - Fallback: If Steam unavailable, opens normal PSN dialog
- OAuth: PlayStation login proceeds in Steam overlay or browser
- QML Backend:
QmlBackend::openPsnLoginInSteamOverlay() - Button Logic:
SettingsDialog.qmlPSN button modified - Wrapper:
SteamworksWrapperclass handles all Steam API calls
In SettingsDialog.qml:
var useSteamOverlay = true; // Set this bool based on your preference# Enable/disable during build
-DCHIAKI_ENABLE_STEAMWORKS=ON/OFF- ✅ No SDK: Compiles without Steamworks, normal browser flow
- ✅ No Steam: Runtime fallback to normal browser flow
- ✅ With Steam: Uses overlay for better integration
gui/src/steamworks/steamworks_api.cppgui/src/steamworks/README.mdgui/include/steamworks/steamworks_wrapper.hgui/third_party/README_STEAMWORKS.mdSTEAMWORKS_INTEGRATION.md
CMakeLists.txt- AddedCHIAKI_ENABLE_STEAMWORKSoptiongui/CMakeLists.txt- Added Steamworks build integrationgui/include/qmlbackend.h- AddedopenPsnLoginInSteamOverlay()methodgui/src/qmlbackend.cpp- Implemented Steam overlay functionalitygui/src/qml/SettingsDialog.qml- Modified PSN button to try Steam first
- Separate Module: All Steam code in isolated directory
- Minimal Touchpoints: Only PSN button logic modified
- Build Optional: Can be disabled with CMake flag
- Zero Impact: No effect when disabled or SDK missing
- Single Purpose: Only handles Steam overlay activation
- Clear Interface: Simple wrapper with minimal API
- Self-Contained: All Steam dependencies isolated
- Documentation: Comprehensive setup and usage guides
- Set your Steam App ID in
steamworks_api.cpp - Place Steamworks SDK in
gui/third_party/steamworks_sdk/ - Build with
-DCHIAKI_ENABLE_STEAMWORKS=ON - Run pylux through Steam (required for overlay)
- Click "Login to PSN" → Opens in Steam overlay! 🎉
- Valid Steam developer account and App ID
- Steamworks SDK from Valve
- Steam client running when using overlay
- pylux launched through Steam for overlay access
This integration enhances the user experience while maintaining complete backward compatibility and build flexibility!