stop updater on dll detach

This commit is contained in:
lightbulblighter 2022-08-07 22:21:04 -07:00
parent dba525678a
commit 9321545e65
No known key found for this signature in database
GPG Key ID: 58D6EDC2C38C9B3B
1 changed files with 5 additions and 1 deletions

View File

@ -4,6 +4,7 @@
#ifndef SERVER
bool isRunning = false;
std::string username;
int placeId;
@ -49,7 +50,9 @@ void InitializeDiscord()
void UpdatePresence()
{
while (true)
isRunning = true;
while (isRunning)
{
std::this_thread::sleep_for(std::chrono::milliseconds(60 * 1000));
@ -93,6 +96,7 @@ void UpdatePresence()
void CleanupDiscord()
{
isRunning = false;
Discord_Shutdown();
}