Exemplo n.º 1
0
 public static void Dispose()
 {
     if (PlayController != null)
     {
         PlayController.Dispose();
         PlayController = null;
     }
 }
Exemplo n.º 2
0
        public void RemoveController(PlayController controller)
        {
            controller.Started -= Controller_Started;
            controller.Stopped -= Controller_Stopped;
            try
            {
                controller.Dispose();
            }
            catch (Exception e) when(!PlayniteEnvironment.ThrowAllErrors)
            {
                logger.Error(e, $"Failed to dispose game controller {controller.GetType()}");
            }

            PlayControllers.Remove(controller);
        }