Fixed issue with game treating bool return values as an int.

This commit is contained in:
Mr_Goldberg 2021-02-16 12:30:24 -05:00
parent bfa1e95f7b
commit 1648c14243
No known key found for this signature in database
GPG key ID: 8597D87419DEF278
3 changed files with 12 additions and 6 deletions

View file

@ -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
/// and the structure is populated. In this case, you MUST call SteamAPI_ManualDispatch_FreeLastCallback
/// (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.
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
/// 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 );
//----------------------------------------------------------------------------------------------------------------------------------------------------------//
//

View file

@ -10,6 +10,12 @@
#pragma once
#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
// Steam-specific types. Defined here so this header file can be included in other code bases.