gunman
Arcane
- Joined
- Jan 4, 2008
- Messages
- 1,050
So I am in the middle of adding some Steam achievements to game, and ran into this nasty issue. I'm asking here, maybe someone dealt with the Steam API before.
When calling SteamAPI_RunCallbacks in the main game loop, I get segmentation fault in steam_api.dll, presumably in the IsSteamRunningInVR function. This is happening only if I request callback for user stats as described in their achievements step-by-step tutorial.
I understand that their Windows lib is for Visual C++ only and my game is build with GCC (Mingw), so I tried to make a dll in Visual C++ to act as a wrapper for some steam functions to be called as standard C functions in my project. I have made wrappers for several functions including for SteamAPI_RunCallbacks, but to no avail. Maybe I made the wrappers for the wrong functions, I don't know.
I have discovered though, that if I comment a large chunk of their code and do not request the callbacks and all, and I just push the achievement without any error handling, it will show up. At least the achievement appeared in my test build, so it's good for now, but it bothers me I have not found a solution to the segmentation fault problem.
When calling SteamAPI_RunCallbacks in the main game loop, I get segmentation fault in steam_api.dll, presumably in the IsSteamRunningInVR function. This is happening only if I request callback for user stats as described in their achievements step-by-step tutorial.
I understand that their Windows lib is for Visual C++ only and my game is build with GCC (Mingw), so I tried to make a dll in Visual C++ to act as a wrapper for some steam functions to be called as standard C functions in my project. I have made wrappers for several functions including for SteamAPI_RunCallbacks, but to no avail. Maybe I made the wrappers for the wrong functions, I don't know.
I have discovered though, that if I comment a large chunk of their code and do not request the callbacks and all, and I just push the achievement without any error handling, it will show up. At least the achievement appeared in my test build, so it's good for now, but it bothers me I have not found a solution to the segmentation fault problem.