public static void DisplayScreenAsync(ScreenSettings settings) { Settings = settings; DisplayThread = new Thread(() => DisplayScreen(settings)) { Name = "Display Thread" }; //DisplayThread.Priority = ThreadPriority.Highest; DisplayThread.Start(); }
public ScreenSettings(ScreenSettings orginal) { if (orginal == null) { return; } WindowTitle = orginal.WindowTitle; LogicTickRate = orginal.LogicTickRate; MaxSkippedFrames = orginal.MaxSkippedFrames; GameSize = orginal.GameSize; WindowSize = orginal.GameSize; Fullscreen = orginal.Fullscreen; VSync = orginal.VSync; MaxFPS = orginal.MaxFPS; }
public static void DisplayScreen(ScreenSettings settings) { if (DisplayThread == null) { DisplayThread = Thread.CurrentThread; } Settings = settings; IsRunning = true; _curProcess = Process.GetCurrentProcess(); _prepare(); if (!Settings.UseOpenTKLoop) { _gameLoop(); } else { _openTKStart(); } }