+
+ vg_info( "steamworks_event::api_call_completed( %lu )\n", pCallCompleted->m_hAsyncCall );
+
+ switch( pCallCompleted->m_iCallback )
+ {
+ case SW_CBID_LeaderboardFindResult:
+ if( sw_leaderboard_found ) sw_leaderboard_found( (LeaderboardFindResult_t*)pTmpCallResult );
+ break;
+ default:break;
+ }
+ }
+ else
+ {
+ typedef enum ESteamAPICallFailure
+ {
+ k_ESteamAPICallFailureNone = -1, // no failure
+ k_ESteamAPICallFailureSteamGone = 0, // the local Steam process has gone away
+ k_ESteamAPICallFailureNetworkFailure = 1, // the network connection to Steam has been broken, or was already broken
+ // SteamServersDisconnected_t callback will be sent around the same time
+ // SteamServersConnected_t will be sent when the client is able to talk to the Steam servers again
+ k_ESteamAPICallFailureInvalidHandle = 2, // the SteamAPICall_t handle passed in no longer exists
+ k_ESteamAPICallFailureMismatchedCallback = 3,// GetAPICallResult() was called with the wrong callback type for this API call
+ } ESteamAPICallFailure;
+
+ ESteamAPICallFailure fail_why =
+ SteamAPI_ISteamUtils_GetAPICallFailureReason( steam_api_classes.utils, pCallCompleted->m_hAsyncCall );
+
+ vg_error( "steamworks_event: error getting call result on %lu (code %d)\n", pCallCompleted->m_hAsyncCall, fail_why );