Uh oh!
There was an error while loading. Please reload this page.
fix misc bugs, performance, stability - #723
Open
maxjivi05 wants to merge 7 commits into
Open
Conversation
Adopted from the SteamLite VAC handoff by The412Banner (Bannerlator), https://github.com/The412Banner/winlator-contents. Their agent is itself a derivative of WinNative's wn-steam-launcher and they handed the work back so WinNative could reach VAC-secured servers. Their handoff, notice and reference scripts are kept under wn-steam-launcher/steamlite-handoff, and CREDITS.md there records exactly what was taken. IClientAppManager::LaunchApp only returns NoError when the app is registered under steamapps\common\<InstallDir> against a matching appmanifest, where InstallDir is Steam's canonical install-folder name. The manifest, the symlink and the launch path were all built from the on-disk folder name instead, which diverges for custom install locations and for apps that fall back to the store name. When it diverged LaunchApp failed with EAppUpdateError=18 and the launcher fell back to CreateProcess, which starts the game -insecure, and VAC-secured servers refuse that connection. The canonical name now drives the manifest installdir, the common symlink and the launch path together. ColdClient keeps the on-disk name its INI is written against, and the shared call site links both names when they differ so neither mode regresses. The launcher also accepts a spec file, by argv or WN_STEAM_GAMEEXE_FILE, carrying the exe path and an appId override, so game paths no longer have to survive Wine command-line quoting. A bare argv path still works.
Verified the SteamLite handoff against the built agent under Wine 9.0. The handoff's argv[1] handling fopen()s the argument and treats any file that opens as a spec, so a bare game-exe path - the documented back-compat form, and the fallback taken when the spec cannot be written - had the first line of its PE header parsed as the game path. The first line must now look like an absolute Windows path before the argument is accepted as a spec. Creating the canonical steamapps/common link as a second call to ensureSteamappsCommonSymlink also re-copied the game's _CommonRedist into Steamworks Shared on every launch. Both link names are now created in one pass with the redists staged once, which also restores the on-disk-named link at the setupSteamEnvironment call site. The reference scripts vendored from the handoff were being dropped by the repo-wide *.py ignore; force-added so the attribution is complete. Credit: The412Banner (Bannerlator), https://github.com/The412Banner/winlator-contents - see wn-steam-launcher/steamlite-handoff/CREDITS.md
Resolve SteamUtils.createAppManifest: keep the branch's canonical installdir name for the steamapps/common symlink and take upstream's cached installSizeOnDisk() in place of the per-call directory walk.
Compatibility - Every Java toLowerCase()/toUpperCase() call that fed a comparison used the device locale. On Turkish and Azerbaijani devices the dotted/dotless i mapping turns "steam_api.dll" into "steam_apı.dll", so DLL injection, exe discovery, the unins/redist exclusions, the process-name allowlist, controller detection, Wine identifier parsing, the present-mode switch and the debug key injector (XKeycode.valueOf on "KEY_İ") all silently misbehaved. All 43 sites across 13 files now use Locale.ROOT. Kotlin already used lowercase(), which is locale-invariant. Stability - WinlatorFilesProvider.queryChildDocuments and querySearchDocuments iterated listFiles() unchecked; a directory the provider cannot read crashed the system file picker with an NPE. - ContainerManager.loadShortcuts wrapped listFiles() in Arrays.asList, so the null guard that followed was dead code and a null result threw before it. - MidiManager.getSF2Files relied on catching the NPE from Arrays.asList(null) instead of checking the result. - XServerDisplayActivity.isPaused is read from the Steam exit-watch thread while being written on the main thread; it is now volatile. - vulkan.c leaked three JNI-pinned strings (native lib dir, library name, driver name) and two asprintf buffers (driver path, temp dir) on every GPUInformation probe. The getters now strdup and release, and winlator_open_vulkan frees everything on all paths. adrenotools copies its arguments into std::string, so freeing after the call is safe. Performance - ensureSteamappsCommonSymlink copied the whole _CommonRedist tree into Steamworks Shared on every Steam launch. It is now an incremental sync that skips files whose size and mtime already match, and stamps the copy's mtime so the next launch skips it. - Seven drawer-menu toggles persisted preferences with commit() on the UI thread; they use apply() like the rest of the file. - HttpUtils had no connect or read timeout, never disconnected, computed progress against a possibly negative Content-Length, and spun up a new non-daemon single-thread executor per download. It now sets 15 s/30 s timeouts, follows redirects, disconnects in finally, uses a long byte counter, only reports progress when the percentage changes, and runs on one shared daemon pool. Verified: compileStandardDebugKotlin, compileStandardDebugJavaWithJavac, externalNativeBuildStandardDebug and testStandardDebugUnitTest.
PR WinNative-Emu#720 squash-merged the VAC launcher work, so the merge base predates the two commits this branch still carried and git saw the shared content as a conflict on both sides. steam.exe: take main's 1154560-byte build. It is the WinNative-Emu#720 agent, which contains this branch's VAC work plus the multiplayer/networking/cloud saves fixes, so it supersedes the 1087488-byte build here. WineUtils: keep the incremental _CommonRedist sync. Main's side is the squashed copy of this branch's own symlink staging with the full-tree FileUtils.copy still in place, because the audit fix landed after WinNative-Emu#720 was cut.
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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 freeto 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.
No description provided.