MCPcopy Create free account
hub / github.com/Selectively11/CloudRedirect / InitLinux

Function InitLinux

src/platform/linux/cloud_intercept.cpp:222–246  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

220namespace CloudIntercept {
221
222void InitLinux() {
223 bool expected = false;
224 if (!g_initDone.compare_exchange_strong(expected, true)) return;
225
226 g_homePath = GetHome();
227
228 // Detect Steam path
229 {
230 std::lock_guard<std::mutex> lock(g_mutex);
231 g_steamPath = DetectSteamPath();
232 }
233 LOG("[Linux] Steam path: %s", g_steamPath.c_str());
234
235 // Bootstrap account ID from loginusers.vdf
236 uint32_t accountId = LoadAccountIdFromLoginUsers();
237 if (accountId != 0) {
238 g_accountId.store(accountId, std::memory_order_release);
239 }
240
241 // Load namespace apps from SLSsteam config and watch for changes.
242 std::string watchedPath = LoadNamespaceAppsFromSLSsteam();
243 if (!watchedPath.empty()) {
244 std::thread(WatchSLSsteamConfig, watchedPath).detach();
245 }
246}
247
248bool IsNamespaceApp(uint32_t appId) {
249 std::lock_guard<std::mutex> lock(g_nsMutex);

Callers 1

EnsureInitializedFunction · 0.85

Calls 4

GetHomeFunction · 0.85
DetectSteamPathFunction · 0.85

Tested by

no test coverage detected