diff --git a/CefService.cs b/CefService.cs index a90e59b7..7e7d541d 100644 --- a/CefService.cs +++ b/CefService.cs @@ -5,9 +5,16 @@ using System.IO; namespace VRCX { - public static class CefService + public class CefService { - public static void Init() + public static CefService Instance { get; private set; } + + static CefService() + { + Instance = new CefService(); + } + + internal void Init() { var cefSettings = new CefSettings { @@ -52,7 +59,7 @@ namespace VRCX } } - public static void Exit() + internal void Exit() { Cef.Shutdown(); } diff --git a/Program.cs b/Program.cs index b222ee23..9fdfebff 100644 --- a/Program.cs +++ b/Program.cs @@ -44,11 +44,11 @@ namespace VRCX WebApi.Instance.Init(); LogWatcher.Instance.Init(); - CefService.Init(); + CefService.Instance.Init(); VRCXVR.Init(); Application.Run(new MainForm()); VRCXVR.Exit(); - CefService.Exit(); + CefService.Instance.Exit(); LogWatcher.Instance.Exit(); WebApi.Instance.Exit();