From ee9460e0944b2f978b86fd0239594cce23ff025b Mon Sep 17 00:00:00 2001 From: saku-kaarakainen Date: Tue, 6 Sep 2016 22:08:47 +0300 Subject: [PATCH] Revert "#22: Commented out thread and added blue rectangle to a screen. (the actual drawing has been commented out.)" This reverts commit 380948aedca09b1c4f88dbc56f0551732141a6c1. --- WinBoyEmulator/GameBoy/Emulator.cs | 12 ++++++------ WinBoyEmulator/MainForm.Designer.cs | 22 +++++++++------------- WinBoyEmulator/MainForm.cs | 16 ---------------- 3 files changed, 15 insertions(+), 35 deletions(-) diff --git a/WinBoyEmulator/GameBoy/Emulator.cs b/WinBoyEmulator/GameBoy/Emulator.cs index 727a7f7..512b82a 100644 --- a/WinBoyEmulator/GameBoy/Emulator.cs +++ b/WinBoyEmulator/GameBoy/Emulator.cs @@ -100,12 +100,12 @@ public void StartEmulation(string gamePath) _readGameFile(gamePath); MMU.Instance.Load(_game); - //var thread = new Thread(_gameCycle) - //{ - // IsBackground = true, - // Name = "WinBoyEmulator", - //}; - //thread.Start(); + var thread = new Thread(_gameCycle) + { + IsBackground = true, + Name = "WinBoyEmulator", + }; + thread.Start(); } } diff --git a/WinBoyEmulator/MainForm.Designer.cs b/WinBoyEmulator/MainForm.Designer.cs index 109ade0..ff7b1ec 100644 --- a/WinBoyEmulator/MainForm.Designer.cs +++ b/WinBoyEmulator/MainForm.Designer.cs @@ -55,14 +55,12 @@ private void InitializeComponent() // // _menuStripMain // - this._menuStripMain.ImageScalingSize = new System.Drawing.Size(40, 40); this._menuStripMain.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this._toolStripMenuItemFile, this._toolStripMenuItemHelp}); this._menuStripMain.Location = new System.Drawing.Point(0, 0); this._menuStripMain.Name = "_menuStripMain"; - this._menuStripMain.Padding = new System.Windows.Forms.Padding(16, 5, 0, 5); - this._menuStripMain.Size = new System.Drawing.Size(779, 55); + this._menuStripMain.Size = new System.Drawing.Size(284, 24); this._menuStripMain.TabIndex = 0; this._menuStripMain.Text = "menuStrip1"; // @@ -72,20 +70,20 @@ private void InitializeComponent() this._toolStripMenuItemOpen, this._toolStripMenuItemClose}); this._toolStripMenuItemFile.Name = "_toolStripMenuItemFile"; - this._toolStripMenuItemFile.Size = new System.Drawing.Size(75, 45); + this._toolStripMenuItemFile.Size = new System.Drawing.Size(37, 20); this._toolStripMenuItemFile.Text = "File"; // // _toolStripMenuItemOpen // this._toolStripMenuItemOpen.Name = "_toolStripMenuItemOpen"; - this._toolStripMenuItemOpen.Size = new System.Drawing.Size(339, 46); + this._toolStripMenuItemOpen.Size = new System.Drawing.Size(156, 22); this._toolStripMenuItemOpen.Text = "Open (Ctrl + O)"; this._toolStripMenuItemOpen.Click += new System.EventHandler(this._toolStripMenuItemOpen_Click); // // _toolStripMenuItemClose // this._toolStripMenuItemClose.Name = "_toolStripMenuItemClose"; - this._toolStripMenuItemClose.Size = new System.Drawing.Size(339, 46); + this._toolStripMenuItemClose.Size = new System.Drawing.Size(156, 22); this._toolStripMenuItemClose.Text = "Close (Alt + F)"; this._toolStripMenuItemClose.Click += new System.EventHandler(this._toolStripMenuItemClose_Click); // @@ -95,20 +93,20 @@ private void InitializeComponent() this._toolStripMenuItemAbout, this._toolStripMenuItemSourceCode}); this._toolStripMenuItemHelp.Name = "_toolStripMenuItemHelp"; - this._toolStripMenuItemHelp.Size = new System.Drawing.Size(92, 45); + this._toolStripMenuItemHelp.Size = new System.Drawing.Size(44, 20); this._toolStripMenuItemHelp.Text = "Help"; // // _toolStripMenuItemAbout // this._toolStripMenuItemAbout.Name = "_toolStripMenuItemAbout"; - this._toolStripMenuItemAbout.Size = new System.Drawing.Size(422, 46); + this._toolStripMenuItemAbout.Size = new System.Drawing.Size(190, 22); this._toolStripMenuItemAbout.Text = "About (F1)"; this._toolStripMenuItemAbout.Click += new System.EventHandler(this._toolStripMenuItemAbout_Click); // // _toolStripMenuItemSourceCode // this._toolStripMenuItemSourceCode.Name = "_toolStripMenuItemSourceCode"; - this._toolStripMenuItemSourceCode.Size = new System.Drawing.Size(422, 46); + this._toolStripMenuItemSourceCode.Size = new System.Drawing.Size(190, 22); this._toolStripMenuItemSourceCode.Text = "Source-code (GitHub)"; this._toolStripMenuItemSourceCode.Click += new System.EventHandler(this._toolStripMenuItemSourceCode_Click); // @@ -119,16 +117,14 @@ private void InitializeComponent() // // MainForm // - this.AutoScaleDimensions = new System.Drawing.SizeF(16F, 31F); + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(779, 622); + this.ClientSize = new System.Drawing.Size(284, 261); this.Controls.Add(this._menuStripMain); this.MainMenuStrip = this._menuStripMain; - this.Margin = new System.Windows.Forms.Padding(8, 7, 8, 7); this.Name = "MainForm"; this.Text = "Form1"; this.Load += new System.EventHandler(this.MainForm_Load); - this.Paint += new System.Windows.Forms.PaintEventHandler(this.MainForm_Paint); this._menuStripMain.ResumeLayout(false); this._menuStripMain.PerformLayout(); this.ResumeLayout(false); diff --git a/WinBoyEmulator/MainForm.cs b/WinBoyEmulator/MainForm.cs index 4db71fd..9c57ccc 100644 --- a/WinBoyEmulator/MainForm.cs +++ b/WinBoyEmulator/MainForm.cs @@ -57,21 +57,5 @@ private void _openFileDialogMain_FileOk(object sender, CancelEventArgs e) { Emulator.Instance.StartEmulation(_openFileDialogMain.FileName); } - - private void MainForm_Paint(object sender, PaintEventArgs e) - { - // Create solid brush. - SolidBrush blueBrush = new SolidBrush(Color.Blue); - - Rectangle rectangle = new Rectangle(0, 0, 200, 200); - - Graphics graphics = e.Graphics; - //graphics.FillRectangle(blueBrush, rectangle); - } - - private void _timer_tick(object sender, EventArgs e) - { - - } } }