-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Enable optional minimal SteamAPI integration for usage time tracking (editor only). #79126
Conversation
I haven't followed the original discussion closely, but this would mean that for the official distribution we'd need to compile Linux, macOS, and Windows builds twice with and without this flag? |
The Steam library is loaded dynamically, so a single build with flag will work fine without Steam. But I guess we do not want official non-Steam builds to have the ability to automatically load proprietary code, so probably yes. |
I finally took the time to test this (rebased on current
That seems weird as it's indeed present in the public headers for the SDK version. |
Seems like it's |
Indeed, I tested with So I could test that when running it through Steam, this fixes the time tracking issue. On the other hand, successfully init'ing the Steam API seems to prevent running the binary from the command line:
(no window shows up) Is that something we could address somehow so we get the benefit when in Steam, but not the drawbacks otherwise? Maybe there's an env variable set by Steam which we can check to know whether to bother init'ing the Steam API in the first place? |
Updated, but have not tested, will do it tomorrow. |
Tested it (on macOS and Windows, both 32-bit and 64-bit), seems to work fine.
I can't reproduce it. This might be memory corruption, since new function require fixed size string buffer, if you replaced only the function name it might write over some other data. |
Yeah I had just replaced the function name so that's probably why. I'll test the new version asap. |
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.
Tested on Windows and Linux, seems to work well.
On Linux, time tracking was already working fine and doesn't regress.
On Windows, this PR solves the time tracking issue.
Thanks! |
Disabled by default, can be enabled with (
steamapi=yes
build option),(it's only needed when running executable outside of Steam download) andsteam_appid.txt
steam_api
library from the SDK should be added to distribution for this feature to work.It initializes Steam API to inform Steam that Godot editor is running, but not using it in any way.
Fixes #18233
Reopened #56727, GitHub seems to completely ignore force pushes to the branches with "invalid characters", so it was impossible to update original PR.