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

Update Steamworks API to 1.6.2 #689

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

MindsEyeGames
Copy link

Attempted to follow the instructions in CodeGen/README.md, and then updated the dll/so/dylib files and the info in Version.cs.

I might have missed a step, please double-check this all looks good :/ Additionally, this was done on Windows (and thus there are unfortunately line ending changes in this), so I assume it's preferable to just have someone more connected to the project do it directly on Linux :/

But figured I would try to contribute a version update since I was asking for it in #687 - hopefully this is helpful!

(It's worth noting that some parts of the API seem to have been deprecated/removed in this version update - those functions look less common, but still worth calling out)

Attempted to follow the instructions in CodeGen/README.md, and then updated the dll/so/dylib files and the info in Version.cs

This was done on Windows (and thus there are unfortunately line ending changes in this), so I assume it's preferable to just have someone more connected to the project do it directly on Linux :/ But figured I would try to contribute a version update since I was asking for it in rlabrecque#687

Additionally, some parts of the API seem  to have been deprecated/removed - those functions look less common but worth calling out.
@MindsEyeGames MindsEyeGames requested a review from yaakov-h March 20, 2025 02:43
@MindsEyeGames
Copy link
Author

Unfortunately when testing this locally, it looks like the auto code gen made some errors in generating the new files?

I am not sure if I followed the directions incorrectly, or this is a Windows/linux difference thing, or something else went wrong.

Is there a particular timeframe by when the core library can be updated to 1.6.2? If that's relatively soon, I can revert this pull request

@rlabrecque
Copy link
Owner

I'll try to get to it this weekend

FWIW when testing the "GetInput" function, it *is* returning the correct number of input events, but does not seem to actually be storing the values in the passed-in array.

I am unsure what the correct fix is here TBH, I am not familiar enough with c/c# native interop to know if this is a bad way of getting the array changes propagated to C#
@MindsEyeGames
Copy link
Author

I'll try to get to it this weekend

Thank you very much!

FWIW I have been trying to test these changes locally, updated this pull request with a commit that gets things working/functional. (I am still unsure if the typos in question from the code autogen are windows-specific or something)

I would also call out that changing the "out RemotePlayInput_t" native call to "RemotePlayInput_t[]" (which from what I see online should be fine?) does not seem to cause the structs within the array to actually have their data populated (or at least, I'm getting only unknown type events, though the number returned seems accurate). Not sure if I've just changed the type to a wrong thing though :/

This *partially* addresses the struct type union (I believe mouse motion events are being properly serialized) but I can't figure out what's wrong with key press/other events, and it seems to not be handling multi-event responses correctly.

I think someone who knows a lot more about code interop needs to take it from here, honestly :/
@MindsEyeGames
Copy link
Author

Alright, I think I understand the core issue - the union in the RemotePlayInput_t c struct needs to be very explicitly handled in C#. Took my best crack at fixing it, and it seems to handle mouse movement now but other event types are still failing.

@MindsEyeGames
Copy link
Author

As an update, this did actually fix the c#<>c struct issues - have been able to play fully remote mouse + keyboard with it. (An unrelated bug in my integration code was impacting other events 9_9)

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.

3 participants