Add a delay to give games time to register call results.

merge-requests/28/head
Mr_Goldberg 2020-01-18 13:58:30 -05:00
parent e6031c7597
commit 958ced0edd
No known key found for this signature in database
GPG Key ID: 8597D87419DEF278
1 changed files with 2 additions and 1 deletions

View File

@ -89,6 +89,7 @@ public:
}; };
#define STEAM_CALLRESULT_TIMEOUT 120.0 #define STEAM_CALLRESULT_TIMEOUT 120.0
#define STEAM_CALLRESULT_WAIT_FOR_CB 0.05
struct Steam_Call_Result { struct Steam_Call_Result {
Steam_Call_Result(SteamAPICall_t a, int icb, void *r, unsigned int s, double r_in, bool run_cc_cb) { Steam_Call_Result(SteamAPICall_t a, int icb, void *r, unsigned int s, double r_in, bool run_cc_cb) {
api_call = a; api_call = a;
@ -115,7 +116,7 @@ struct Steam_Call_Result {
} }
bool can_execute() { bool can_execute() {
return (!to_delete) && call_completed(); return (!to_delete) && call_completed() && (has_cb() || check_timedout(created, STEAM_CALLRESULT_WAIT_FOR_CB));
} }
bool has_cb() { bool has_cb() {