| 55 | bool (*g_SteamAPI_ISteamApps_BIsAppInstalled)(void *iSteamApps, uint32_t appID) = nullptr; |
| 56 | |
| 57 | static void bind_all(color_ostream& out, DFLibrary* handle) { |
| 58 | #define bind(name) \ |
| 59 | if (!handle) { \ |
| 60 | g_##name = nullptr; \ |
| 61 | } else { \ |
| 62 | g_##name = (decltype(g_##name))LookupPlugin(handle, #name); \ |
| 63 | if (!g_##name) { \ |
| 64 | WARN(dfsteam, out).print("steam library function not found: " #name "\n"); \ |
| 65 | } \ |
| 66 | } |
| 67 | |
| 68 | bind(SteamAPI_Init); |
| 69 | bind(SteamAPI_Shutdown); |
| 70 | bind(SteamAPI_GetHSteamUser); |
| 71 | bind(SteamInternal_FindOrCreateUserInterface); |
| 72 | bind(SteamAPI_RestartAppIfNecessary); |
| 73 | bind(SteamInternal_FindOrCreateUserInterface); |
| 74 | bind(SteamAPI_ISteamApps_BIsAppInstalled); |
| 75 | #undef bind |
| 76 | } |
| 77 | |
| 78 | bool DFSteam::init(color_ostream& out) { |
| 79 | char *steam_client_launch = getenv("SteamClientLaunch"); |