From 76ebfef57193aa019848b25fc289a24cf42fec04 Mon Sep 17 00:00:00 2001 From: Kade M Date: Fri, 2 Apr 2021 14:35:14 -0700 Subject: [PATCH] close the thing on the dead --- source/TitleState.hx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/TitleState.hx b/source/TitleState.hx index c91dc54eb..e643ac1a8 100644 --- a/source/TitleState.hx +++ b/source/TitleState.hx @@ -96,6 +96,10 @@ class TitleState extends MusicBeatState #if desktop DiscordClient.initialize(); + + Application.current.onExit.add (function (exitCode) { + DiscordClient.shutdown(); + }); #end }