private void Start(string[] args) { string appPath = Path.GetDirectoryName(Application.ExecutablePath); if (!Debugger.IsAttached) { System.Environment.CurrentDirectory = appPath; } MainMenu mainmenu = new MainMenu(); GamePlatformNative platform = new GamePlatformNative(); platform.SetExit(exit); platform.crashreporter = crashreporter; platform.singlePlayerServerDummyNetwork = dummyNetwork; this.platform = platform; platform.StartSinglePlayerServer = (filename) => { savefilename = filename; new Thread(ServerThreadStart).Start(); }; GraphicsMode mode = new GraphicsMode(OpenTK.DisplayDevice.Default.BitsPerPixel, 24); using (GameWindowNative game = new GameWindowNative(mode)) { game.VSync = OpenTK.VSyncMode.Adaptive; platform.window = game; game.platform = platform; mainmenu.Start(platform); ReadArgs(mainmenu, args); platform.Start(); game.Run(); } }