MCPcopy Create free account
hub / github.com/DFHack/dfhack / bind_all

Function bind_all

library/modules/DFSteam.cpp:57–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55bool (*g_SteamAPI_ISteamApps_BIsAppInstalled)(void *iSteamApps, uint32_t appID) = nullptr;
56
57static 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
78bool DFSteam::init(color_ostream& out) {
79 char *steam_client_launch = getenv("SteamClientLaunch");

Callers 2

initMethod · 0.85
cleanupMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected