Fixed issue with game treating bool return values as an int.
parent
bfa1e95f7b
commit
1648c14243
|
@ -769,7 +769,7 @@ STEAMAPI_API void S_CALLTYPE SteamAPI_ManualDispatch_RunFrame( HSteamPipe hSteam
|
||||||
/// Fetch the next pending callback on the given pipe, if any. If a callback is available, true is returned
|
/// Fetch the next pending callback on the given pipe, if any. If a callback is available, true is returned
|
||||||
/// and the structure is populated. In this case, you MUST call SteamAPI_ManualDispatch_FreeLastCallback
|
/// and the structure is populated. In this case, you MUST call SteamAPI_ManualDispatch_FreeLastCallback
|
||||||
/// (after dispatching the callback) before calling SteamAPI_ManualDispatch_GetNextCallback again.
|
/// (after dispatching the callback) before calling SteamAPI_ManualDispatch_GetNextCallback again.
|
||||||
STEAMAPI_API bool S_CALLTYPE SteamAPI_ManualDispatch_GetNextCallback( HSteamPipe hSteamPipe, CallbackMsg_t *pCallbackMsg )
|
STEAMAPI_API steam_bool S_CALLTYPE SteamAPI_ManualDispatch_GetNextCallback( HSteamPipe hSteamPipe, CallbackMsg_t *pCallbackMsg )
|
||||||
{
|
{
|
||||||
PRINT_DEBUG("%s\n", __FUNCTION__);
|
PRINT_DEBUG("%s\n", __FUNCTION__);
|
||||||
std::queue<struct cb_data> *q = NULL;
|
std::queue<struct cb_data> *q = NULL;
|
||||||
|
@ -829,7 +829,7 @@ STEAMAPI_API void S_CALLTYPE SteamAPI_ManualDispatch_FreeLastCallback( HSteamPip
|
||||||
|
|
||||||
/// Return the call result for the specified call on the specified pipe. You really should
|
/// Return the call result for the specified call on the specified pipe. You really should
|
||||||
/// only call this in a handler for SteamAPICallCompleted_t callback.
|
/// only call this in a handler for SteamAPICallCompleted_t callback.
|
||||||
STEAMAPI_API bool S_CALLTYPE SteamAPI_ManualDispatch_GetAPICallResult( HSteamPipe hSteamPipe, SteamAPICall_t hSteamAPICall, void *pCallback, int cubCallback, int iCallbackExpected, bool *pbFailed )
|
STEAMAPI_API steam_bool S_CALLTYPE SteamAPI_ManualDispatch_GetAPICallResult( HSteamPipe hSteamPipe, SteamAPICall_t hSteamAPICall, void *pCallback, int cubCallback, int iCallbackExpected, bool *pbFailed )
|
||||||
{
|
{
|
||||||
PRINT_DEBUG("SteamAPI_ManualDispatch_GetAPICallResult %i %llu %i %i\n", hSteamPipe, hSteamAPICall, cubCallback, iCallbackExpected);
|
PRINT_DEBUG("SteamAPI_ManualDispatch_GetAPICallResult %i %llu %i %i\n", hSteamPipe, hSteamAPICall, cubCallback, iCallbackExpected);
|
||||||
Steam_Client *steam_client = get_steam_client();
|
Steam_Client *steam_client = get_steam_client();
|
||||||
|
@ -961,7 +961,7 @@ SteamMasterServerUpdater
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
STEAMCLIENT_API bool Steam_BGetCallback( HSteamPipe hSteamPipe, CallbackMsg_t *pCallbackMsg )
|
STEAMCLIENT_API steam_bool Steam_BGetCallback( HSteamPipe hSteamPipe, CallbackMsg_t *pCallbackMsg )
|
||||||
{
|
{
|
||||||
PRINT_DEBUG("%s %i\n", __FUNCTION__, hSteamPipe);
|
PRINT_DEBUG("%s %i\n", __FUNCTION__, hSteamPipe);
|
||||||
SteamAPI_ManualDispatch_Init();
|
SteamAPI_ManualDispatch_Init();
|
||||||
|
@ -976,7 +976,7 @@ STEAMCLIENT_API void Steam_FreeLastCallback( HSteamPipe hSteamPipe )
|
||||||
SteamAPI_ManualDispatch_FreeLastCallback( hSteamPipe );
|
SteamAPI_ManualDispatch_FreeLastCallback( hSteamPipe );
|
||||||
}
|
}
|
||||||
|
|
||||||
STEAMCLIENT_API bool Steam_GetAPICallResult( HSteamPipe hSteamPipe, SteamAPICall_t hSteamAPICall, void* pCallback, int cubCallback, int iCallbackExpected, bool* pbFailed )
|
STEAMCLIENT_API steam_bool Steam_GetAPICallResult( HSteamPipe hSteamPipe, SteamAPICall_t hSteamAPICall, void* pCallback, int cubCallback, int iCallbackExpected, bool* pbFailed )
|
||||||
{
|
{
|
||||||
PRINT_DEBUG("Steam_GetAPICallResult %i %llu %i %i\n", hSteamPipe, hSteamAPICall, cubCallback, iCallbackExpected);
|
PRINT_DEBUG("Steam_GetAPICallResult %i %llu %i %i\n", hSteamPipe, hSteamAPICall, cubCallback, iCallbackExpected);
|
||||||
return SteamAPI_ManualDispatch_GetAPICallResult(hSteamPipe, hSteamAPICall, pCallback, cubCallback, iCallbackExpected, pbFailed);
|
return SteamAPI_ManualDispatch_GetAPICallResult(hSteamPipe, hSteamAPICall, pCallback, cubCallback, iCallbackExpected, pbFailed);
|
||||||
|
|
|
@ -311,14 +311,14 @@ S_API void S_CALLTYPE SteamAPI_ManualDispatch_RunFrame( HSteamPipe hSteamPipe );
|
||||||
/// Fetch the next pending callback on the given pipe, if any. If a callback is available, true is returned
|
/// Fetch the next pending callback on the given pipe, if any. If a callback is available, true is returned
|
||||||
/// and the structure is populated. In this case, you MUST call SteamAPI_ManualDispatch_FreeLastCallback
|
/// and the structure is populated. In this case, you MUST call SteamAPI_ManualDispatch_FreeLastCallback
|
||||||
/// (after dispatching the callback) before calling SteamAPI_ManualDispatch_GetNextCallback again.
|
/// (after dispatching the callback) before calling SteamAPI_ManualDispatch_GetNextCallback again.
|
||||||
S_API bool S_CALLTYPE SteamAPI_ManualDispatch_GetNextCallback( HSteamPipe hSteamPipe, CallbackMsg_t *pCallbackMsg );
|
S_API steam_bool S_CALLTYPE SteamAPI_ManualDispatch_GetNextCallback( HSteamPipe hSteamPipe, CallbackMsg_t *pCallbackMsg );
|
||||||
|
|
||||||
/// You must call this after dispatching the callback, if SteamAPI_ManualDispatch_GetNextCallback returns true.
|
/// You must call this after dispatching the callback, if SteamAPI_ManualDispatch_GetNextCallback returns true.
|
||||||
S_API void S_CALLTYPE SteamAPI_ManualDispatch_FreeLastCallback( HSteamPipe hSteamPipe );
|
S_API void S_CALLTYPE SteamAPI_ManualDispatch_FreeLastCallback( HSteamPipe hSteamPipe );
|
||||||
|
|
||||||
/// Return the call result for the specified call on the specified pipe. You really should
|
/// Return the call result for the specified call on the specified pipe. You really should
|
||||||
/// only call this in a handler for SteamAPICallCompleted_t callback.
|
/// only call this in a handler for SteamAPICallCompleted_t callback.
|
||||||
S_API bool S_CALLTYPE SteamAPI_ManualDispatch_GetAPICallResult( HSteamPipe hSteamPipe, SteamAPICall_t hSteamAPICall, void *pCallback, int cubCallback, int iCallbackExpected, bool *pbFailed );
|
S_API steam_bool S_CALLTYPE SteamAPI_ManualDispatch_GetAPICallResult( HSteamPipe hSteamPipe, SteamAPICall_t hSteamAPICall, void *pCallback, int cubCallback, int iCallbackExpected, bool *pbFailed );
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------------------------------------------------------------//
|
//----------------------------------------------------------------------------------------------------------------------------------------------------------//
|
||||||
//
|
//
|
||||||
|
|
|
@ -10,6 +10,12 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
for some dumb reason some games like carrion think a bool is an int and use the whole register as a return value
|
||||||
|
instead of using just al like a normal program.
|
||||||
|
*/
|
||||||
|
typedef unsigned steam_bool;
|
||||||
|
|
||||||
#define S_CALLTYPE __cdecl
|
#define S_CALLTYPE __cdecl
|
||||||
|
|
||||||
// Steam-specific types. Defined here so this header file can be included in other code bases.
|
// Steam-specific types. Defined here so this header file can be included in other code bases.
|
||||||
|
|
Loading…
Reference in New Issue