public static Config GetConfig() { var config = new Config(ConfigUtilities.GetConfigPath()); if (!config.IsRestoredFromFile) { var vm = GetDefaultVideoMode(); config.video_screenwidth = (int)vm.Width; config.video_screenheight = (int)vm.Height; } return(config); }
public void Run() { while (window.IsOpen) { window.DispatchEvents(); if (doom.Update() == UpdateResult.Completed) { break; } video.Render(doom); } config.Save(ConfigUtilities.GetConfigPath()); }