コード例 #1
0
        private void GameRunning_OnUnloaded(object sender, RoutedEventArgs e)
        {
            if (Lazydata.ParrotData.UseDiscordRPC)
            {
                DiscordRPC.ClearPresence();
            }
#if DEBUG
            jvsDebug?.Close();
#endif
            TerminateThreads();
            Thread.Sleep(100);
            if (_runEmuOnly)
            {
                MainWindow.SafeExit();
            }
        }
コード例 #2
0
 /// <summary>
 /// Prevent closing if game is running.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void GameRunning_OnClosing(object sender, CancelEventArgs e)
 {
     if (_parrotData.UseDiscordRPC)
     {
         DiscordRPC.ClearPresence();
     }
     if (_gameRunning)
     {
         e.Cancel = true;
     }
     TerminateThreads();
     Thread.Sleep(100);
     if (_runEmuOnly)
     {
         MainWindow.SafeExit();
     }
 }