Exemplo n.º 1
0
 public MainForm()
 {
     synchronizationContext = SynchronizationContext.Current;
     speedUpdateStopwatch   = Stopwatch.StartNew();
     InitializeComponent();
     ScaleStatusStrip(CurrentAutoScaleDimensions.Height / 96F);             // In DPI scaling mode, CurrentAutoScaleDimensions is the current screen DPI.
     if (components == null)
     {
         components = new System.ComponentModel.Container();
     }
     emulatedGameBoy = new EmulatedGameBoy(components);
     emulatedGameBoy.TryUsingBootRom         = Settings.Default.UseBootstrapRom;
     emulatedGameBoy.EnableFramerateLimiter  = Settings.Default.LimitSpeed;
     emulatedGameBoy.RomChanged             += OnRomChanged;
     emulatedGameBoy.AfterReset             += OnAfterReset;
     emulatedGameBoy.EmulationStatusChanged += OnEmulationStatusChanged;
     emulatedGameBoy.NewFrame      += OnNewFrame;
     emulatedGameBoy.BorderChanged += OnBorderChanged;
     try { emulatedGameBoy.Reset(Settings.Default.HardwareType); }
     catch (ArgumentOutOfRangeException) { Settings.Default.HardwareType = emulatedGameBoy.HardwareType; }
     AdjustSize(Settings.Default.ContentSize);
     UpdateEmulationStatus();
     UpdateSpeed();
     SetStatusTextHandler();
     CreateRendererMenuItems();
 }
Exemplo n.º 2
0
		public MainForm()
		{
			InitializeComponent();
			if (components == null) components = new System.ComponentModel.Container();
			emulatedGameBoy = new EmulatedGameBoy(components);
			emulatedGameBoy.TryUsingBootRom = Settings.Default.UseBootstrapRom;
			emulatedGameBoy.EnableFramerateLimiter = Settings.Default.LimitSpeed;
			emulatedGameBoy.RomChanged += OnRomChanged;
			emulatedGameBoy.AfterReset += OnAfterReset;
			emulatedGameBoy.EmulationStatusChanged += OnEmulationStatusChanged;
			emulatedGameBoy.NewFrame += OnNewFrame;
			emulatedGameBoy.BorderChanged += OnBorderChanged;
			try { emulatedGameBoy.Reset(Settings.Default.HardwareType); }
			catch (ArgumentOutOfRangeException) { Settings.Default.HardwareType = emulatedGameBoy.HardwareType; }
			AdjustSize(Settings.Default.ContentSize);
			UpdateEmulationStatus();
			UpdateFrameRate();
			SetStatusTextHandler();
			CreateRendererMenuItems();
		}
Exemplo n.º 3
0
 private void resetToolStripMenuItem_Click(object sender, EventArgs e)
 {
     emulatedGameBoy.Reset();
 }