File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -162,9 +162,34 @@ void UCOColor(WORD color, const char* text)
162162#endif
163163}
164164
165- void * InitSteamClient (HMODULE* phMod, bool bLocal, const char * iface);
166- void LoadBreakpadSymbols (HMODULE hMod);
167- void UpdateMinidumpSteamID (uint64 sid);
165+ void * InitSteamClient (HMODULE* phMod, bool bLocal, const char * iface)
166+ {
167+ UCOLOG (" [UCOnline2] InitSteamClient -> %s" , iface);
168+
169+ const char * steamClientPath = " steamclient.dll" ;
170+ #if defined(_M_AMD64)
171+ steamClientPath = " steamclient64.dll" ;
172+ #endif
173+
174+ HMODULE hMod = LoadLibraryA (steamClientPath);
175+ if (!hMod)
176+ {
177+ UCOColor (FOREGROUND_RED | FOREGROUND_INTENSITY, " [UCOnline2] Failed to load steamclient.dll\r\n " );
178+ return nullptr ;
179+ }
180+
181+ if (phMod)
182+ *phMod = hMod;
183+
184+ Fn_CreateInterface pfnCreateInterface = (Fn_CreateInterface)GetProcAddress (hMod, " CreateInterface" );
185+ if (!pfnCreateInterface)
186+ {
187+ UCOColor (FOREGROUND_RED | FOREGROUND_INTENSITY, " [UCOnline2] Failed to get CreateInterface\r\n " );
188+ return nullptr ;
189+ }
190+
191+ return pfnCreateInterface (iface, nullptr );
192+ }
168193
169194// ============================================================
170195// LoadGameOverlay
You can’t perform that action at this time.
0 commit comments