diff --git a/lsteamclient/lsteamclient.spec b/lsteamclient/lsteamclient.spec index 4bb73815..f5ad77f8 100644 --- a/lsteamclient/lsteamclient.spec +++ b/lsteamclient/lsteamclient.spec @@ -56,6 +56,9 @@ 56 stub hid_write 57 stub hid_write_output_report +@ cdecl Steam_IsKnownInterface(ptr) +@ cdecl Steam_NotifyMissingInterface(long ptr) + # GameOverlayRenderer entry points @ stub BOverlayNeedsPresent @ stub IsOverlayEnabled diff --git a/lsteamclient/steamclient_main.c b/lsteamclient/steamclient_main.c index a5368b20..adfa4a81 100644 --- a/lsteamclient/steamclient_main.c +++ b/lsteamclient/steamclient_main.c @@ -828,6 +828,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_FreeLastCallback)(HSteamPipe); 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) { @@ -893,6 +895,18 @@ static int load_steamclient(void) 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_cond_init(&callback_queue_callback_event, NULL); pthread_cond_init(&callback_queue_ready_event, NULL); @@ -1112,3 +1126,17 @@ HSteamPipe after_steam_pipe_create(HSteamPipe pipe) return pipe; } + +bool Steam_IsKnownInterface( const char *pchVersion ) +{ + TRACE("%s\n", pchVersion); + load_steamclient(); + return steamclient_IsKnownInterface( pchVersion ); +} + +void Steam_NotifyMissingInterface( HSteamPipe hSteamPipe, const char *pchVersion ) +{ + TRACE("%u %s\n", hSteamPipe, pchVersion); + load_steamclient(); + steamclient_NotifyMissingInterface( hSteamPipe, pchVersion ); +}