[Proxy] Handle steam crashes
This commit is contained in:
parent
bda6d32b57
commit
46cada4bb3
@ -365,8 +365,12 @@ namespace Steam
|
|||||||
|
|
||||||
Components::Toast::ShowNative(templ);
|
Components::Toast::ShowNative(templ);
|
||||||
|
|
||||||
|
uint32_t user = Proxy::GetActiveUser();
|
||||||
ShellExecuteA(nullptr, nullptr, steamExe.data(), "-silent", nullptr, 1);
|
ShellExecuteA(nullptr, nullptr, steamExe.data(), "-silent", nullptr, 1);
|
||||||
|
|
||||||
|
// If steam has crashed, the user is not null, therefore we can't check if login is done, so we wait 3 seconds so steam can reset it
|
||||||
|
if (user) std::this_thread::sleep_for(3ms);
|
||||||
|
|
||||||
::Utils::Time::Interval interval;
|
::Utils::Time::Interval interval;
|
||||||
while (!interval.elapsed(15s) && !Proxy::GetActiveUser()) std::this_thread::sleep_for(10ms);
|
while (!interval.elapsed(15s) && !Proxy::GetActiveUser()) std::this_thread::sleep_for(10ms);
|
||||||
std::this_thread::sleep_for(1s);
|
std::this_thread::sleep_for(1s);
|
||||||
|
Loading…
Reference in New Issue
Block a user