Beispiel #1
0
 public static void DisplayScreenAsync(ScreenSettings settings)
 {
     Settings      = settings;
     DisplayThread = new Thread(() => DisplayScreen(settings))
     {
         Name = "Display Thread"
     };
     //DisplayThread.Priority = ThreadPriority.Highest;
     DisplayThread.Start();
 }
Beispiel #2
0
 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;
 }
Beispiel #3
0
        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();
            }
        }