stop updater on dll detach
This commit is contained in:
parent
dba525678a
commit
9321545e65
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
#ifndef SERVER
|
#ifndef SERVER
|
||||||
|
|
||||||
|
bool isRunning = false;
|
||||||
std::string username;
|
std::string username;
|
||||||
int placeId;
|
int placeId;
|
||||||
|
|
||||||
|
|
@ -49,7 +50,9 @@ void InitializeDiscord()
|
||||||
|
|
||||||
void UpdatePresence()
|
void UpdatePresence()
|
||||||
{
|
{
|
||||||
while (true)
|
isRunning = true;
|
||||||
|
|
||||||
|
while (isRunning)
|
||||||
{
|
{
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(60 * 1000));
|
std::this_thread::sleep_for(std::chrono::milliseconds(60 * 1000));
|
||||||
|
|
||||||
|
|
@ -93,6 +96,7 @@ void UpdatePresence()
|
||||||
|
|
||||||
void CleanupDiscord()
|
void CleanupDiscord()
|
||||||
{
|
{
|
||||||
|
isRunning = false;
|
||||||
Discord_Shutdown();
|
Discord_Shutdown();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue