//TODO Mover delay FPS aquí private void Run(object state) { int cnt = 0; #if DEBUG Stopwatch sw = new Stopwatch(); sw.Start(); #endif while (running) { if (!disableInput) { SpeccyKeyboard.Update(); } #if DEBUG cnt++; #endif if (scene != null) { if (scene.Finished) { if (NextScene != null) { NextScene(scene.FinishData, EventArgs.Empty); } } else { scene.Frame(mult, screen, g); } } else { Thread.Sleep(10); } #if DEBUG if (sw.ElapsedMilliseconds > 2000) { Debug.WriteLine("FPS: " + (cnt * 1000.0 / 2000)); cnt = 0; sw.Restart(); } #endif } }
protected string InKeys() { return(SpeccyKeyboard.PressedKeys()); }