-
-
Notifications
You must be signed in to change notification settings - Fork 85
Upgrade to steamworks-rs v0.12.1 #196
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
base: main
Are you sure you want to change the base?
Conversation
@@ -24,8 +24,6 @@ pub fn init(app_id: Option<u32>) -> Result<(), Error> { | |||
| SteamAPIInitError::VersionMismatch(msg) => Error::from_reason(msg), | |||
})?; | |||
|
|||
steam_client.user_stats().request_current_stats(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was deprecated in version 1.61 of the steamworks sdk:
ISteamUserStats:
- RequestCurrentStats is no longer necessary and has been removed. The Steam Client will synchronize this data before your game launches.
Seems like I'm running into an error with these changes:
Still investigating what's going on here so I'll leave this as draft for now |
if let Some(handle) = self.handle.take() { | ||
handle.disconnect(); | ||
} | ||
get_registry().lock().unwrap().remove(&self.id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All these changes are basically here to re-fix #77.
Noxime/steamworks-rs#128 was reverted in Noxime/steamworks-rs#241, and it seems like the fix on steamworks-rs's side is not coming back. So instead I tried to fix this on the rust side of things in steamworks.js. Basically a reference to each handle is kept in the CALLBACK_REGISTRY
, which is removed from the registry when the user calls disconnect()
I'll have to admit I used a fair bit of AI to get this part to work as I'm not too familiar with rust. So feel free to make changes if this is absolute garbage.
Seems like the error was just a result of outdated redistributable files, this should be ready now! |
No description provided.