diff --git a/BizHawk.Client.Common/config/Config.cs b/BizHawk.Client.Common/config/Config.cs index 15ed2a38de..7ef99a6e5f 100644 --- a/BizHawk.Client.Common/config/Config.cs +++ b/BizHawk.Client.Common/config/Config.cs @@ -193,7 +193,6 @@ namespace BizHawk.Client.Common public int DispRamWatchx = 0; public int DispRamWatchy = 70; public bool DisplayRamWatch = false; - public bool ShowMenuInFullscreen = false; public int DispMessagex = 3; public int DispMessagey = 0; public int DispMessageanchor = 2; @@ -209,6 +208,13 @@ namespace BizHawk.Client.Common //warning: we dont even want to deal with changing this at runtime. but we want it changed here for config purposes. so dont check this variable. check in GlobalWin or something like that. public EDispMethod DispMethod = EDispMethod.OpenGL; + public int DispChrome_FrameWindowed = 2; + public bool DispChrome_StatusBarWindowed = true; + public bool DispChrome_CaptionWindowed = true; + public bool DispChrome_MenuWindowed = true; + public bool DispChrome_StatusBarFullscreen = false; + public bool DispChrome_MenuFullscreen = false; + public EDispManagerAR DispManagerAR = EDispManagerAR.System; public int DispCustomUserARWidth = 1; public int DispCustomUserARHeight = 1; diff --git a/BizHawk.Client.EmuHawk/MainForm.Events.cs b/BizHawk.Client.EmuHawk/MainForm.Events.cs index 1024696bb6..d77b265d06 100644 --- a/BizHawk.Client.EmuHawk/MainForm.Events.cs +++ b/BizHawk.Client.EmuHawk/MainForm.Events.cs @@ -1974,9 +1974,12 @@ namespace BizHawk.Client.EmuHawk OpenRomContextMenuItem.Visible = Global.Emulator.IsNull() || _inFullscreen; + bool showMenuVisible = _inFullscreen; + if (!MainMenuStrip.Visible) showMenuVisible = true; //need to always be able to restore this as an emergency measure + if (_chromeless) showMenuVisible = true; //I decided this was always possible in chromeless mode, we'll see what they think ShowMenuContextMenuItem.Visible = ShowMenuContextMenuSeparator.Visible = - _inFullscreen; + showMenuVisible; LoadLastRomContextMenuItem.Visible = Global.Emulator.IsNull(); @@ -2058,10 +2061,7 @@ namespace BizHawk.Client.EmuHawk UndoSavestateContextMenuItem.Image = Properties.Resources.undo; } - if (_inFullscreen) - { - ShowMenuContextMenuItem.Text = MainMenuStrip.Visible ? "Hide Menu" : "Show Menu"; - } + ShowMenuContextMenuItem.Text = MainMenuStrip.Visible ? "Hide Menu" : "Show Menu"; } private void MainFormContextMenu_Closing(object sender, ToolStripDropDownClosingEventArgs e) @@ -2091,6 +2091,7 @@ namespace BizHawk.Client.EmuHawk if (result == DialogResult.OK) { FrameBufferResized(); + SynchChrome(); //not sure if we'll end up needing to do this due to framebuffer resizing, putting it here for now anyway though } } @@ -2192,6 +2193,7 @@ namespace BizHawk.Client.EmuHawk private void ShowMenuContextMenuItem_Click(object sender, EventArgs e) { MainMenuStrip.Visible ^= true; + FrameBufferResized(); } #endregion diff --git a/BizHawk.Client.EmuHawk/MainForm.cs b/BizHawk.Client.EmuHawk/MainForm.cs index 762b6e028b..2462017742 100644 --- a/BizHawk.Client.EmuHawk/MainForm.cs +++ b/BizHawk.Client.EmuHawk/MainForm.cs @@ -271,6 +271,10 @@ namespace BizHawk.Client.EmuHawk { _autoCloseOnDump = true; } + else if (arg.StartsWith("--chromeless")) + { + _chromeless = true; + } else if (arg.StartsWith("--fullscreen")) { startFullscreen = true; @@ -484,6 +488,8 @@ namespace BizHawk.Client.EmuHawk SetMainformMovieInfo(); + SynchChrome(); + //TODO POOP GlobalWin.PresentationPanel.Control.Paint += (o, e) => { @@ -982,6 +988,32 @@ namespace BizHawk.Client.EmuHawk get { return _inFullscreen; } } + public void SynchChrome() + { + //PANTS + + if (_inFullscreen) + { + //TODO - maybe apply a hack tracked during fullscreen here to override it + FormBorderStyle = FormBorderStyle.None; + MainMenuStrip.Visible = Global.Config.DispChrome_MenuFullscreen && !_chromeless; + MainStatusBar.Visible = Global.Config.DispChrome_StatusBarFullscreen && !_chromeless; + } + else + { + MainStatusBar.Visible = Global.Config.DispChrome_StatusBarWindowed && !_chromeless; + MainMenuStrip.Visible = Global.Config.DispChrome_MenuWindowed && !_chromeless; + MaximizeBox = MinimizeBox = Global.Config.DispChrome_CaptionWindowed && !_chromeless; + if (Global.Config.DispChrome_FrameWindowed == 0 || _chromeless) + FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + else if (Global.Config.DispChrome_FrameWindowed == 1) + FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow; + else if (Global.Config.DispChrome_FrameWindowed == 2) + FormBorderStyle = System.Windows.Forms.FormBorderStyle.Sizable; + } + + } + public void ToggleFullscreen(bool allowSuppress=false) { //prohibit this operation if the current controls include LMouse @@ -1004,26 +1036,27 @@ namespace BizHawk.Client.EmuHawk //Please note: It is important to do this before resizing things, otherwise momentarily a GL control without WS_BORDER will be at the magic dimensions and cause the flakeout if (Global.Config.DispFullscreenHacks) { + //ATTENTION: this causes the statusbar to not work well, since the backcolor is now set to black instead of SystemColors.Control. + //It seems that some statusbar elements composite with the backcolor. + //Maybe we could add another control under the statusbar. with a different backcolor Padding = new Padding(1); BackColor = Color.Black; } #endif _windowedLocation = Location; - FormBorderStyle = FormBorderStyle.None; - WindowState = FormWindowState.Maximized; - MainMenuStrip.Visible = Global.Config.ShowMenuInFullscreen; - MainStatusBar.Visible = false; + + _inFullscreen = true; + SynchChrome(); + WindowState = FormWindowState.Maximized; //be sure to do this after setting the chrome, otherwise it wont work fully ResumeLayout(); GlobalWin.PresentationPanel.Resized = true; - _inFullscreen = true; } else { SuspendLayout(); - FormBorderStyle = FormBorderStyle.Sizable; WindowState = FormWindowState.Normal; #if WINDOWS @@ -1034,13 +1067,13 @@ namespace BizHawk.Client.EmuHawk BackColor = SystemColors.Control; #endif - MainMenuStrip.Visible = true; - MainStatusBar.Visible = Global.Config.DisplayStatusBar; + _inFullscreen = false; + + SynchChrome(); Location = _windowedLocation; ResumeLayout(); FrameBufferResized(); - _inFullscreen = false; } } @@ -1271,6 +1304,9 @@ namespace BizHawk.Client.EmuHawk private readonly bool _autoCloseOnDump; private int _lastOpenRomFilter; + //chrome is never shown, even in windowed mode + private readonly bool _chromeless; + // Resources Bitmap StatusBarDiskLightOnImage, StatusBarDiskLightOffImage; Bitmap LinkCableOn, LinkCableOff; @@ -1324,6 +1360,9 @@ namespace BizHawk.Client.EmuHawk } } + if (!Global.Config.DispChrome_CaptionWindowed || _chromeless) + str = ""; + Text = str; } diff --git a/BizHawk.Client.EmuHawk/config/DisplayConfigLite.Designer.cs b/BizHawk.Client.EmuHawk/config/DisplayConfigLite.Designer.cs index bbbd3495a0..43f5ee8ed5 100644 --- a/BizHawk.Client.EmuHawk/config/DisplayConfigLite.Designer.cs +++ b/BizHawk.Client.EmuHawk/config/DisplayConfigLite.Designer.cs @@ -54,10 +54,8 @@ this.label3 = new System.Windows.Forms.Label(); this.txtCustomARWidth = new System.Windows.Forms.TextBox(); this.rbUseCustom = new System.Windows.Forms.RadioButton(); - this.checkFullscreenHacks = new System.Windows.Forms.CheckBox(); this.label2 = new System.Windows.Forms.Label(); this.checkSnowyNullEmulator = new System.Windows.Forms.CheckBox(); - this.label1 = new System.Windows.Forms.Label(); this.rbOpenGL = new System.Windows.Forms.RadioButton(); this.label5 = new System.Windows.Forms.Label(); this.tabControl1 = new System.Windows.Forms.TabControl(); @@ -65,11 +63,24 @@ this.tpDispMethod = new System.Windows.Forms.TabPage(); this.label6 = new System.Windows.Forms.Label(); this.groupBox3 = new System.Windows.Forms.GroupBox(); + this.label8 = new System.Windows.Forms.Label(); + this.rbD3D9 = new System.Windows.Forms.RadioButton(); this.label7 = new System.Windows.Forms.Label(); this.rbGDIPlus = new System.Windows.Forms.RadioButton(); this.tpMisc = new System.Windows.Forms.TabPage(); - this.rbD3D9 = new System.Windows.Forms.RadioButton(); - this.label8 = new System.Windows.Forms.Label(); + this.tabPage1 = new System.Windows.Forms.TabPage(); + this.trackbarFrameSizeWindowed = new System.Windows.Forms.TrackBar(); + this.label9 = new System.Windows.Forms.Label(); + this.cbStatusBarWindowed = new System.Windows.Forms.CheckBox(); + this.cbCaptionWindowed = new System.Windows.Forms.CheckBox(); + this.cbMenuWindowed = new System.Windows.Forms.CheckBox(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.lblFrameTypeWindowed = new System.Windows.Forms.Label(); + this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.cbStatusBarFullscreen = new System.Windows.Forms.CheckBox(); + this.cbMenuFullscreen = new System.Windows.Forms.CheckBox(); + this.label1 = new System.Windows.Forms.Label(); + this.checkFullscreenHacks = new System.Windows.Forms.CheckBox(); this.groupBox1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.tbScanlineIntensity)).BeginInit(); this.grpFinalFilter.SuspendLayout(); @@ -79,6 +90,10 @@ this.tpDispMethod.SuspendLayout(); this.groupBox3.SuspendLayout(); this.tpMisc.SuspendLayout(); + this.tabPage1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.trackbarFrameSizeWindowed)).BeginInit(); + this.groupBox2.SuspendLayout(); + this.groupBox4.SuspendLayout(); this.SuspendLayout(); // // btnCancel @@ -355,19 +370,9 @@ this.rbUseCustom.Text = "Use custom Size:"; this.rbUseCustom.UseVisualStyleBackColor = true; // - // checkFullscreenHacks - // - this.checkFullscreenHacks.AutoSize = true; - this.checkFullscreenHacks.Location = new System.Drawing.Point(2, 7); - this.checkFullscreenHacks.Name = "checkFullscreenHacks"; - this.checkFullscreenHacks.Size = new System.Drawing.Size(191, 17); - this.checkFullscreenHacks.TabIndex = 14; - this.checkFullscreenHacks.Text = "Enable Windows Fullscreen Hacks"; - this.checkFullscreenHacks.UseVisualStyleBackColor = true; - // // label2 // - this.label2.Location = new System.Drawing.Point(3, 131); + this.label2.Location = new System.Drawing.Point(4, 28); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(398, 45); this.label2.TabIndex = 17; @@ -377,21 +382,13 @@ // checkSnowyNullEmulator // this.checkSnowyNullEmulator.AutoSize = true; - this.checkSnowyNullEmulator.Location = new System.Drawing.Point(2, 106); + this.checkSnowyNullEmulator.Location = new System.Drawing.Point(3, 3); this.checkSnowyNullEmulator.Name = "checkSnowyNullEmulator"; this.checkSnowyNullEmulator.Size = new System.Drawing.Size(159, 17); this.checkSnowyNullEmulator.TabIndex = 16; this.checkSnowyNullEmulator.Text = "Enable Snowy Null Emulator"; this.checkSnowyNullEmulator.UseVisualStyleBackColor = true; // - // label1 - // - this.label1.Location = new System.Drawing.Point(3, 30); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(398, 73); - this.label1.TabIndex = 15; - this.label1.Text = resources.GetString("label1.Text"); - // // rbOpenGL // this.rbOpenGL.AutoSize = true; @@ -421,6 +418,7 @@ this.tabControl1.Controls.Add(this.tpAR); this.tabControl1.Controls.Add(this.tpDispMethod); this.tabControl1.Controls.Add(this.tpMisc); + this.tabControl1.Controls.Add(this.tabPage1); this.tabControl1.Location = new System.Drawing.Point(12, 12); this.tabControl1.Name = "tabControl1"; this.tabControl1.SelectedIndex = 0; @@ -475,6 +473,27 @@ this.groupBox3.TabIndex = 16; this.groupBox3.TabStop = false; // + // label8 + // + this.label8.Location = new System.Drawing.Point(24, 30); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(359, 47); + this.label8.TabIndex = 20; + this.label8.Text = " • Not working yet\r\n • Best compatibility\r\n • No support for custom shaders\r\n"; + // + // rbD3D9 + // + this.rbD3D9.AutoSize = true; + this.rbD3D9.Checked = true; + this.rbD3D9.Enabled = false; + this.rbD3D9.Location = new System.Drawing.Point(6, 10); + this.rbD3D9.Name = "rbD3D9"; + this.rbD3D9.Size = new System.Drawing.Size(73, 17); + this.rbD3D9.TabIndex = 19; + this.rbD3D9.TabStop = true; + this.rbD3D9.Text = "Direct3D9"; + this.rbD3D9.UseVisualStyleBackColor = true; + // // label7 // this.label7.Location = new System.Drawing.Point(21, 170); @@ -500,8 +519,6 @@ // this.tpMisc.Controls.Add(this.label2); this.tpMisc.Controls.Add(this.checkSnowyNullEmulator); - this.tpMisc.Controls.Add(this.checkFullscreenHacks); - this.tpMisc.Controls.Add(this.label1); this.tpMisc.Location = new System.Drawing.Point(4, 22); this.tpMisc.Name = "tpMisc"; this.tpMisc.Size = new System.Drawing.Size(415, 356); @@ -509,26 +526,142 @@ this.tpMisc.Text = "Misc"; this.tpMisc.UseVisualStyleBackColor = true; // - // rbD3D9 + // tabPage1 // - this.rbD3D9.AutoSize = true; - this.rbD3D9.Checked = true; - this.rbD3D9.Enabled = false; - this.rbD3D9.Location = new System.Drawing.Point(6, 10); - this.rbD3D9.Name = "rbD3D9"; - this.rbD3D9.Size = new System.Drawing.Size(73, 17); - this.rbD3D9.TabIndex = 19; - this.rbD3D9.TabStop = true; - this.rbD3D9.Text = "Direct3D9"; - this.rbD3D9.UseVisualStyleBackColor = true; + this.tabPage1.Controls.Add(this.groupBox4); + this.tabPage1.Controls.Add(this.groupBox2); + this.tabPage1.Location = new System.Drawing.Point(4, 22); + this.tabPage1.Name = "tabPage1"; + this.tabPage1.Padding = new System.Windows.Forms.Padding(3); + this.tabPage1.Size = new System.Drawing.Size(415, 356); + this.tabPage1.TabIndex = 4; + this.tabPage1.Text = "Window"; + this.tabPage1.UseVisualStyleBackColor = true; // - // label8 + // trackbarFrameSizeWindowed // - this.label8.Location = new System.Drawing.Point(24, 30); - this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(359, 47); - this.label8.TabIndex = 20; - this.label8.Text = " • Not working yet\r\n • Best compatibility\r\n • No support for custom shaders\r\n"; + this.trackbarFrameSizeWindowed.LargeChange = 1; + this.trackbarFrameSizeWindowed.Location = new System.Drawing.Point(6, 33); + this.trackbarFrameSizeWindowed.Maximum = 2; + this.trackbarFrameSizeWindowed.Name = "trackbarFrameSizeWindowed"; + this.trackbarFrameSizeWindowed.Size = new System.Drawing.Size(99, 42); + this.trackbarFrameSizeWindowed.TabIndex = 21; + this.trackbarFrameSizeWindowed.Value = 1; + this.trackbarFrameSizeWindowed.ValueChanged += new System.EventHandler(this.trackbarFrameSizeWindowed_ValueChanged); + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Location = new System.Drawing.Point(6, 17); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(39, 13); + this.label9.TabIndex = 22; + this.label9.Text = "Frame:"; + // + // cbStatusBarWindowed + // + this.cbStatusBarWindowed.AutoSize = true; + this.cbStatusBarWindowed.Location = new System.Drawing.Point(9, 81); + this.cbStatusBarWindowed.Name = "cbStatusBarWindowed"; + this.cbStatusBarWindowed.Size = new System.Drawing.Size(75, 17); + this.cbStatusBarWindowed.TabIndex = 23; + this.cbStatusBarWindowed.Text = "Status Bar"; + this.cbStatusBarWindowed.UseVisualStyleBackColor = true; + // + // cbCaptionWindowed + // + this.cbCaptionWindowed.AutoSize = true; + this.cbCaptionWindowed.Location = new System.Drawing.Point(9, 104); + this.cbCaptionWindowed.Name = "cbCaptionWindowed"; + this.cbCaptionWindowed.Size = new System.Drawing.Size(62, 17); + this.cbCaptionWindowed.TabIndex = 24; + this.cbCaptionWindowed.Text = "Caption"; + this.cbCaptionWindowed.UseVisualStyleBackColor = true; + // + // cbMenuWindowed + // + this.cbMenuWindowed.AutoSize = true; + this.cbMenuWindowed.Location = new System.Drawing.Point(9, 127); + this.cbMenuWindowed.Name = "cbMenuWindowed"; + this.cbMenuWindowed.Size = new System.Drawing.Size(53, 17); + this.cbMenuWindowed.TabIndex = 25; + this.cbMenuWindowed.Text = "Menu"; + this.cbMenuWindowed.UseVisualStyleBackColor = true; + // + // groupBox2 + // + this.groupBox2.Controls.Add(this.lblFrameTypeWindowed); + this.groupBox2.Controls.Add(this.cbStatusBarWindowed); + this.groupBox2.Controls.Add(this.label9); + this.groupBox2.Controls.Add(this.cbMenuWindowed); + this.groupBox2.Controls.Add(this.trackbarFrameSizeWindowed); + this.groupBox2.Controls.Add(this.cbCaptionWindowed); + this.groupBox2.Location = new System.Drawing.Point(6, 6); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(131, 212); + this.groupBox2.TabIndex = 26; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "Windowed"; + // + // lblFrameTypeWindowed + // + this.lblFrameTypeWindowed.AutoSize = true; + this.lblFrameTypeWindowed.Location = new System.Drawing.Point(51, 17); + this.lblFrameTypeWindowed.Name = "lblFrameTypeWindowed"; + this.lblFrameTypeWindowed.Size = new System.Drawing.Size(62, 13); + this.lblFrameTypeWindowed.TabIndex = 26; + this.lblFrameTypeWindowed.Text = "(frame type)"; + // + // groupBox4 + // + this.groupBox4.Controls.Add(this.label1); + this.groupBox4.Controls.Add(this.checkFullscreenHacks); + this.groupBox4.Controls.Add(this.cbStatusBarFullscreen); + this.groupBox4.Controls.Add(this.cbMenuFullscreen); + this.groupBox4.Location = new System.Drawing.Point(143, 6); + this.groupBox4.Name = "groupBox4"; + this.groupBox4.Size = new System.Drawing.Size(266, 212); + this.groupBox4.TabIndex = 27; + this.groupBox4.TabStop = false; + this.groupBox4.Text = "Fullscreen"; + // + // cbStatusBarFullscreen + // + this.cbStatusBarFullscreen.AutoSize = true; + this.cbStatusBarFullscreen.Location = new System.Drawing.Point(6, 19); + this.cbStatusBarFullscreen.Name = "cbStatusBarFullscreen"; + this.cbStatusBarFullscreen.Size = new System.Drawing.Size(75, 17); + this.cbStatusBarFullscreen.TabIndex = 23; + this.cbStatusBarFullscreen.Text = "Status Bar"; + this.cbStatusBarFullscreen.UseVisualStyleBackColor = true; + // + // cbMenuFullscreen + // + this.cbMenuFullscreen.AutoSize = true; + this.cbMenuFullscreen.Location = new System.Drawing.Point(6, 42); + this.cbMenuFullscreen.Name = "cbMenuFullscreen"; + this.cbMenuFullscreen.Size = new System.Drawing.Size(53, 17); + this.cbMenuFullscreen.TabIndex = 25; + this.cbMenuFullscreen.Text = "Menu"; + this.cbMenuFullscreen.UseVisualStyleBackColor = true; + // + // label1 + // + this.label1.Location = new System.Drawing.Point(7, 88); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(240, 115); + this.label1.TabIndex = 27; + this.label1.Text = resources.GetString("label1.Text"); + // + // checkFullscreenHacks + // + this.checkFullscreenHacks.AutoSize = true; + this.checkFullscreenHacks.Location = new System.Drawing.Point(6, 65); + this.checkFullscreenHacks.Name = "checkFullscreenHacks"; + this.checkFullscreenHacks.Size = new System.Drawing.Size(191, 17); + this.checkFullscreenHacks.TabIndex = 26; + this.checkFullscreenHacks.Text = "Enable Windows Fullscreen Hacks"; + this.checkFullscreenHacks.UseVisualStyleBackColor = true; // // DisplayConfigLite // @@ -559,6 +692,12 @@ this.groupBox3.PerformLayout(); this.tpMisc.ResumeLayout(false); this.tpMisc.PerformLayout(); + this.tabPage1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.trackbarFrameSizeWindowed)).EndInit(); + this.groupBox2.ResumeLayout(false); + this.groupBox2.PerformLayout(); + this.groupBox4.ResumeLayout(false); + this.groupBox4.PerformLayout(); this.ResumeLayout(false); } @@ -584,10 +723,8 @@ private System.Windows.Forms.RadioButton rbUseRaw; private System.Windows.Forms.RadioButton rbUseSystem; private System.Windows.Forms.GroupBox grpARSelection; - private System.Windows.Forms.CheckBox checkFullscreenHacks; private System.Windows.Forms.CheckBox checkSnowyNullEmulator; private System.Windows.Forms.Label label2; - private System.Windows.Forms.Label label1; private System.Windows.Forms.Label lblScanlines; private System.Windows.Forms.TextBox txtCustomARHeight; private System.Windows.Forms.Label label3; @@ -606,5 +743,18 @@ private System.Windows.Forms.TabPage tpMisc; private System.Windows.Forms.Label label8; private System.Windows.Forms.RadioButton rbD3D9; + private System.Windows.Forms.TabPage tabPage1; + private System.Windows.Forms.CheckBox cbStatusBarWindowed; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.TrackBar trackbarFrameSizeWindowed; + private System.Windows.Forms.CheckBox cbMenuWindowed; + private System.Windows.Forms.CheckBox cbCaptionWindowed; + private System.Windows.Forms.GroupBox groupBox4; + private System.Windows.Forms.CheckBox cbStatusBarFullscreen; + private System.Windows.Forms.CheckBox cbMenuFullscreen; + private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.Label lblFrameTypeWindowed; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.CheckBox checkFullscreenHacks; } } \ No newline at end of file diff --git a/BizHawk.Client.EmuHawk/config/DisplayConfigLite.cs b/BizHawk.Client.EmuHawk/config/DisplayConfigLite.cs index 98134ca6d8..3219a8b682 100644 --- a/BizHawk.Client.EmuHawk/config/DisplayConfigLite.cs +++ b/BizHawk.Client.EmuHawk/config/DisplayConfigLite.cs @@ -40,6 +40,14 @@ namespace BizHawk.Client.EmuHawk.config rbGDIPlus.Checked = Global.Config.DispMethod == Config.EDispMethod.GdiPlus; rbD3D9.Checked = Global.Config.DispMethod == Config.EDispMethod.SlimDX9; + cbStatusBarWindowed.Checked = Global.Config.DispChrome_StatusBarWindowed; + cbCaptionWindowed.Checked = Global.Config.DispChrome_CaptionWindowed; + cbMenuWindowed.Checked = Global.Config.DispChrome_MenuWindowed; + cbStatusBarFullscreen.Checked = Global.Config.DispChrome_StatusBarFullscreen; + cbMenuFullscreen.Checked = Global.Config.DispChrome_MenuFullscreen; + trackbarFrameSizeWindowed.Value = Global.Config.DispChrome_FrameWindowed; + SyncTrackbar(); + // null emulator config hack { NullEmulator.NullEmulatorSettings s; @@ -86,6 +94,13 @@ namespace BizHawk.Client.EmuHawk.config Global.Config.DispFixScaleInteger = checkPadInteger.Checked; Global.Config.DispFullscreenHacks = checkFullscreenHacks.Checked; + Global.Config.DispChrome_StatusBarWindowed = cbStatusBarWindowed.Checked; + Global.Config.DispChrome_CaptionWindowed = cbCaptionWindowed.Checked; + Global.Config.DispChrome_MenuWindowed = cbMenuWindowed.Checked; + Global.Config.DispChrome_StatusBarFullscreen = cbStatusBarFullscreen.Checked; + Global.Config.DispChrome_MenuFullscreen = cbMenuFullscreen.Checked; + Global.Config.DispChrome_FrameWindowed = trackbarFrameSizeWindowed.Value; + // HACK:: null emulator's settings don't persist to config normally { NullEmulator.NullEmulatorSettings s; @@ -176,5 +191,20 @@ namespace BizHawk.Client.EmuHawk.config lblScanlines.Text = String.Format("{0:F2}", percentage) + "%"; } + private void trackbarFrameSizeWindowed_ValueChanged(object sender, EventArgs e) + { + SyncTrackbar(); + } + + void SyncTrackbar() + { + if (trackbarFrameSizeWindowed.Value == 0) + lblFrameTypeWindowed.Text = "None"; + if (trackbarFrameSizeWindowed.Value == 1) + lblFrameTypeWindowed.Text = "Thin"; + if (trackbarFrameSizeWindowed.Value == 2) + lblFrameTypeWindowed.Text = "Thick"; + } + } } diff --git a/BizHawk.Client.EmuHawk/config/GuiOptions.Designer.cs b/BizHawk.Client.EmuHawk/config/GuiOptions.Designer.cs index 42aa42fca5..68efc988c6 100644 --- a/BizHawk.Client.EmuHawk/config/GuiOptions.Designer.cs +++ b/BizHawk.Client.EmuHawk/config/GuiOptions.Designer.cs @@ -42,7 +42,6 @@ this.AcceptBackgroundInputCheckbox = new System.Windows.Forms.CheckBox(); this.label1 = new System.Windows.Forms.Label(); this.RunInBackgroundCheckbox = new System.Windows.Forms.CheckBox(); - this.ShowMenuInFullscreenCheckbox = new System.Windows.Forms.CheckBox(); this.SaveWindowPositionCheckbox = new System.Windows.Forms.CheckBox(); this.EnableContextMenuCheckbox = new System.Windows.Forms.CheckBox(); this.StartPausedCheckbox = new System.Windows.Forms.CheckBox(); @@ -144,7 +143,6 @@ this.tabPage1.Controls.Add(this.AcceptBackgroundInputCheckbox); this.tabPage1.Controls.Add(this.label1); this.tabPage1.Controls.Add(this.RunInBackgroundCheckbox); - this.tabPage1.Controls.Add(this.ShowMenuInFullscreenCheckbox); this.tabPage1.Controls.Add(this.SaveWindowPositionCheckbox); this.tabPage1.Controls.Add(this.EnableContextMenuCheckbox); this.tabPage1.Controls.Add(this.StartPausedCheckbox); @@ -243,16 +241,6 @@ this.RunInBackgroundCheckbox.Text = "Run in background"; this.RunInBackgroundCheckbox.UseVisualStyleBackColor = true; // - // ShowMenuInFullscreenCheckbox - // - this.ShowMenuInFullscreenCheckbox.AutoSize = true; - this.ShowMenuInFullscreenCheckbox.Location = new System.Drawing.Point(6, 40); - this.ShowMenuInFullscreenCheckbox.Name = "ShowMenuInFullscreenCheckbox"; - this.ShowMenuInFullscreenCheckbox.Size = new System.Drawing.Size(145, 17); - this.ShowMenuInFullscreenCheckbox.TabIndex = 1; - this.ShowMenuInFullscreenCheckbox.Text = "Show Menu in Fullscreen"; - this.ShowMenuInFullscreenCheckbox.UseVisualStyleBackColor = true; - // // SaveWindowPositionCheckbox // this.SaveWindowPositionCheckbox.AutoSize = true; @@ -786,7 +774,6 @@ private System.Windows.Forms.CheckBox PauseWhenMenuActivatedCheckbox; private System.Windows.Forms.CheckBox EnableContextMenuCheckbox; private System.Windows.Forms.CheckBox SaveWindowPositionCheckbox; - private System.Windows.Forms.CheckBox ShowMenuInFullscreenCheckbox; private System.Windows.Forms.CheckBox RunInBackgroundCheckbox; private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label2; diff --git a/BizHawk.Client.EmuHawk/config/GuiOptions.cs b/BizHawk.Client.EmuHawk/config/GuiOptions.cs index 0424df85a1..9de9c96926 100644 --- a/BizHawk.Client.EmuHawk/config/GuiOptions.cs +++ b/BizHawk.Client.EmuHawk/config/GuiOptions.cs @@ -25,7 +25,6 @@ namespace BizHawk.Client.EmuHawk PauseWhenMenuActivatedCheckbox.Checked = Global.Config.PauseWhenMenuActivated; EnableContextMenuCheckbox.Checked = Global.Config.ShowContextMenu; SaveWindowPositionCheckbox.Checked = Global.Config.SaveWindowPosition; - ShowMenuInFullscreenCheckbox.Checked = Global.Config.ShowMenuInFullscreen; RunInBackgroundCheckbox.Checked = Global.Config.RunInBackground; AcceptBackgroundInputCheckbox.Checked = Global.Config.AcceptBackgroundInput; NeverAskSaveCheckbox.Checked = Global.Config.SupressAskSave; @@ -41,7 +40,7 @@ namespace BizHawk.Client.EmuHawk LogWindowAsConsoleCheckbox.Enabled = false; toolTip1.SetToolTip( LogWindowAsConsoleCheckbox, - "This can not be chaned while the log window is open. I know, it's annoying."); + "This can not be changed while the log window is open. I know, it's annoying."); } // Recent @@ -63,7 +62,6 @@ namespace BizHawk.Client.EmuHawk Global.Config.PauseWhenMenuActivated = PauseWhenMenuActivatedCheckbox.Checked; Global.Config.ShowContextMenu = EnableContextMenuCheckbox.Checked; Global.Config.SaveWindowPosition = SaveWindowPositionCheckbox.Checked; - Global.Config.ShowMenuInFullscreen = ShowMenuInFullscreenCheckbox.Checked; Global.Config.RunInBackground = RunInBackgroundCheckbox.Checked; Global.Config.AcceptBackgroundInput = AcceptBackgroundInputCheckbox.Checked; Global.Config.SupressAskSave = NeverAskSaveCheckbox.Checked; @@ -75,12 +73,6 @@ namespace BizHawk.Client.EmuHawk Global.Config.BackupSaveram = BackupSRamCheckbox.Checked; Global.Config.SkipLagFrame = FrameAdvSkipLagCheckbox.Checked; - // Make sure this gets applied immediately - if (GlobalWin.MainForm.IsInFullscreen) - { - GlobalWin.MainForm.MainMenuStrip.Visible = Global.Config.ShowMenuInFullscreen; - } - //Recent Global.Config.RecentRoms.MAX_RECENT_FILES = (int)RecentRomsNumeric.Value; Global.Config.RecentMovies.MAX_RECENT_FILES = (int)RecentMoviesNumeric.Value;