lsteamclient: Add some missing exports for SDK 1.58.

This commit is contained in:
Rémi Bernon 2023-10-18 19:29:50 +02:00 committed by Arkadiusz Hiler
parent 19c0eec97d
commit 435b67aaf7
2 changed files with 31 additions and 0 deletions

View File

@ -56,6 +56,9 @@
56 stub hid_write 56 stub hid_write
57 stub hid_write_output_report 57 stub hid_write_output_report
@ cdecl Steam_IsKnownInterface(ptr)
@ cdecl Steam_NotifyMissingInterface(long ptr)
# GameOverlayRenderer entry points # GameOverlayRenderer entry points
@ stub BOverlayNeedsPresent @ stub BOverlayNeedsPresent
@ stub IsOverlayEnabled @ stub IsOverlayEnabled

View File

@ -820,6 +820,8 @@ static bool (*steamclient_BGetCallback)(HSteamPipe a, CallbackMsg_t *b, int32 *c
static bool (*steamclient_GetAPICallResult)(HSteamPipe, SteamAPICall_t, void *, int, int, bool *); static bool (*steamclient_GetAPICallResult)(HSteamPipe, SteamAPICall_t, void *, int, int, bool *);
static bool (*steamclient_FreeLastCallback)(HSteamPipe); static bool (*steamclient_FreeLastCallback)(HSteamPipe);
static void (*steamclient_ReleaseThreadLocalMemory)(int); static void (*steamclient_ReleaseThreadLocalMemory)(int);
static bool (*steamclient_IsKnownInterface)( const char *pchVersion );
static void (*steamclient_NotifyMissingInterface)( HSteamPipe hSteamPipe, const char *pchVersion );
static int load_steamclient(void) static int load_steamclient(void)
{ {
@ -885,6 +887,18 @@ static int load_steamclient(void)
return 0; return 0;
} }
steamclient_IsKnownInterface = dlsym(steamclient_lib, "Steam_IsKnownInterface");
if(!steamclient_IsKnownInterface){
ERR("unable to load IsKnownInterface method\n");
return 0;
}
steamclient_NotifyMissingInterface = dlsym(steamclient_lib, "Steam_NotifyMissingInterface");
if(!steamclient_NotifyMissingInterface){
ERR("unable to load NotifyMissingInterface method\n");
return 0;
}
pthread_mutex_init(&callback_queue_mutex, NULL); pthread_mutex_init(&callback_queue_mutex, NULL);
pthread_cond_init(&callback_queue_callback_event, NULL); pthread_cond_init(&callback_queue_callback_event, NULL);
pthread_cond_init(&callback_queue_ready_event, NULL); pthread_cond_init(&callback_queue_ready_event, NULL);
@ -1110,3 +1124,17 @@ HSteamPipe after_steam_pipe_create(HSteamPipe pipe)
return pipe; return pipe;
} }
bool CDECL Steam_IsKnownInterface( const char *pchVersion )
{
TRACE("%s\n", pchVersion);
load_steamclient();
return steamclient_IsKnownInterface( pchVersion );
}
void CDECL Steam_NotifyMissingInterface( HSteamPipe hSteamPipe, const char *pchVersion )
{
TRACE("%u %s\n", hSteamPipe, pchVersion);
load_steamclient();
steamclient_NotifyMissingInterface( hSteamPipe, pchVersion );
}