Skip to content
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

Refactor SteamWorks code and add some async/awaitability to fix performance, "close on exit" setting and UI freezes #345

Merged
merged 10 commits into from
Aug 14, 2023

Conversation

remcoros
Copy link
Contributor

@remcoros remcoros commented Jul 31, 2023

  • Replaces SteamAPIWrapper with 'SteamManager', which is now responsible for calling 'RunCallbacks' in a timer. Except for startup/shutdown, no one should call init/runcallbacks/shutdown manually.
  • Fixed an issue where callback (not callresults!) were registered multiple times, resulting in ever growing steamworks callbacks. (on first mod download, the event is triggered once, on next download, event was triggered twice, then 3 times, etc)
  • Wrapped steam callbacks (CallResults) into an async helper function using proper async/await constructs.
  • What was made async has been updated to be async up all the way to the UI.
  • Due to this, I had to restructure some Winforms init/load code

This also makes refreshing the mod info from steam not lock up the UI anymore.

fixes #317
fixes #289
fixes #268

@remcoros
Copy link
Contributor Author

ready for test / review

@remcoros remcoros force-pushed the fixes/steamworks_refactor branch from 6e2be0d to a6c77ea Compare July 31, 2023 16:15
@RevZero RevZero changed the base branch from master to v1.6-dev August 1, 2023 10:48
- preload required mods information async then request it sync, this allowed revering some async changes.
- tweak mod list loading to not unnecessarily refresh/redraw it
- fix updating mod conflicts on check/uncheck
@remcoros
Copy link
Contributor Author

remcoros commented Aug 4, 2023

Regarding Non-steam users.

Instead of testing if the emulator thing still works. Wouldn't it be be better to include a "Disable Steam" option.

On startup, if there is an error with steam. We can ask trough a dialog "Do you want to disable Steam?" or smth. and add that option to the settings dialog

… sync again

- get dependencies from steam when not in cache
- refresh mod list filter after hide/unhide to update mod list properly
@RevZero RevZero merged commit eb1a4ed into X2CommunityCore:v1.6-dev Aug 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Close after lauch setting doesn't work Crash upon starting AML hangs after updating mods
2 participants