diff --git a/src/BizHawk.Client.Common/config/Config.cs b/src/BizHawk.Client.Common/config/Config.cs index 50f5715f0f..b1f8837484 100644 --- a/src/BizHawk.Client.Common/config/Config.cs +++ b/src/BizHawk.Client.Common/config/Config.cs @@ -102,6 +102,7 @@ namespace BizHawk.Client.Common public RecentFiles RecentRoms { get; set; } = new RecentFiles(10); public bool PauseWhenMenuActivated { get; set; } = true; public bool SaveWindowPosition { get; set; } = true; + public bool MainFormStayOnTop { get; set; } public bool StartPaused { get; set; } public bool StartFullscreen { get; set; } public int MainWndx { get; set; } = -1; // Negative numbers will be ignored diff --git a/src/BizHawk.Client.EmuHawk/MainForm.Events.cs b/src/BizHawk.Client.EmuHawk/MainForm.Events.cs index 1f817eb0fd..1da90ab1b9 100644 --- a/src/BizHawk.Client.EmuHawk/MainForm.Events.cs +++ b/src/BizHawk.Client.EmuHawk/MainForm.Events.cs @@ -2422,7 +2422,7 @@ namespace BizHawk.Client.EmuHawk private void DisplayConfigMenuItem_Click(object sender, EventArgs e) { using var window = new DisplayConfig(Config, GL); - if (window.ShowDialog().IsOk()) + if (this.ShowDialogWithTempMute(window).IsOk()) { DisplayManager.RefreshUserShader(); FrameBufferResized(); diff --git a/src/BizHawk.Client.EmuHawk/MainForm.cs b/src/BizHawk.Client.EmuHawk/MainForm.cs index a3ae85a5e9..4beb0d72ea 100644 --- a/src/BizHawk.Client.EmuHawk/MainForm.cs +++ b/src/BizHawk.Client.EmuHawk/MainForm.cs @@ -540,6 +540,8 @@ namespace BizHawk.Client.EmuHawk Location = new Point(Config.MainWndx, Config.MainWndy); } + if (Config.MainFormStayOnTop) TopMost = true; + if (_argParser.cmdRom != null) { // Commandline should always override auto-load diff --git a/src/BizHawk.Client.EmuHawk/config/DisplayConfig.Designer.cs b/src/BizHawk.Client.EmuHawk/config/DisplayConfig.Designer.cs index 6efc57b7d3..cddc5b0da7 100644 --- a/src/BizHawk.Client.EmuHawk/config/DisplayConfig.Designer.cs +++ b/src/BizHawk.Client.EmuHawk/config/DisplayConfig.Designer.cs @@ -111,6 +111,8 @@ this.cbCaptionWindowed = new System.Windows.Forms.CheckBox(); this.linkLabel1 = new System.Windows.Forms.LinkLabel(); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); + this.cbMainFormSaveWindowPosition = new System.Windows.Forms.CheckBox(); + this.cbMainFormStayOnTop = new System.Windows.Forms.CheckBox(); this.groupBox1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.tbScanlineIntensity)).BeginInit(); this.grpFinalFilter.SuspendLayout(); @@ -807,7 +809,7 @@ this.groupBox4.Controls.Add(this.cbFullscreenHacks); this.groupBox4.Controls.Add(this.cbStatusBarFullscreen); this.groupBox4.Controls.Add(this.cbMenuFullscreen); - this.groupBox4.Location = new System.Drawing.Point(143, 6); + this.groupBox4.Location = new System.Drawing.Point(153, 6); this.groupBox4.Name = "groupBox4"; this.groupBox4.Size = new System.Drawing.Size(266, 211); this.groupBox4.TabIndex = 27; @@ -862,6 +864,8 @@ // // groupBox2 // + this.groupBox2.Controls.Add(this.cbMainFormStayOnTop); + this.groupBox2.Controls.Add(this.cbMainFormSaveWindowPosition); this.groupBox2.Controls.Add(this.lblFrameTypeWindowed); this.groupBox2.Controls.Add(this.cbStatusBarWindowed); this.groupBox2.Controls.Add(this.label9); @@ -870,7 +874,7 @@ 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, 211); + this.groupBox2.Size = new System.Drawing.Size(141, 211); this.groupBox2.TabIndex = 26; this.groupBox2.TabStop = false; this.groupBox2.Text = "Windowed"; @@ -939,6 +943,26 @@ this.linkLabel1.Text = "Documentation"; this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.LinkLabel1_LinkClicked); // + // cbMainFormSaveWindowPosition + // + this.cbMainFormSaveWindowPosition.AutoSize = true; + this.cbMainFormSaveWindowPosition.Location = new System.Drawing.Point(9, 150); + this.cbMainFormSaveWindowPosition.Name = "cbMainFormSaveWindowPosition"; + this.cbMainFormSaveWindowPosition.Size = new System.Drawing.Size(133, 17); + this.cbMainFormSaveWindowPosition.TabIndex = 26; + this.cbMainFormSaveWindowPosition.Text = "Save Window Position"; + this.cbMainFormSaveWindowPosition.UseVisualStyleBackColor = true; + // + // cbMainFormStayOnTop + // + this.cbMainFormStayOnTop.AutoSize = true; + this.cbMainFormStayOnTop.Location = new System.Drawing.Point(9, 174); + this.cbMainFormStayOnTop.Name = "cbMainFormStayOnTop"; + this.cbMainFormStayOnTop.Size = new System.Drawing.Size(84, 17); + this.cbMainFormStayOnTop.TabIndex = 27; + this.cbMainFormStayOnTop.Text = "Stay on Top"; + this.cbMainFormStayOnTop.UseVisualStyleBackColor = true; + // // DisplayConfigLite // this.AcceptButton = this.btnOk; @@ -1071,5 +1095,7 @@ private WinForms.Controls.LocSzSingleColumnFLP flpStaticWindowTitles; private WinForms.Controls.CheckBoxEx cbStaticWindowTitles; private WinForms.Controls.LocLabelEx lblStaticWindowTitles; + private System.Windows.Forms.CheckBox cbMainFormStayOnTop; + private System.Windows.Forms.CheckBox cbMainFormSaveWindowPosition; } } \ No newline at end of file diff --git a/src/BizHawk.Client.EmuHawk/config/DisplayConfig.cs b/src/BizHawk.Client.EmuHawk/config/DisplayConfig.cs old mode 100644 new mode 100755 index 6592cb1865..1c1da7e83e --- a/src/BizHawk.Client.EmuHawk/config/DisplayConfig.cs +++ b/src/BizHawk.Client.EmuHawk/config/DisplayConfig.cs @@ -59,6 +59,13 @@ namespace BizHawk.Client.EmuHawk cbStatusBarWindowed.Checked = _config.DispChromeStatusBarWindowed; cbCaptionWindowed.Checked = _config.DispChromeCaptionWindowed; cbMenuWindowed.Checked = _config.DispChromeMenuWindowed; + cbMainFormSaveWindowPosition.Checked = _config.SaveWindowPosition; + cbMainFormStayOnTop.Checked = _config.MainFormStayOnTop; + if (OSTailoredCode.IsUnixHost) + { + cbMainFormStayOnTop.Enabled = false; + cbMainFormStayOnTop.Visible = false; + } cbStatusBarFullscreen.Checked = _config.DispChromeStatusBarFullscreen; cbMenuFullscreen.Checked = _config.DispChromeMenuFullscreen; trackbarFrameSizeWindowed.Value = _config.DispChromeFrameWindowed; @@ -135,6 +142,9 @@ namespace BizHawk.Client.EmuHawk _config.DispChromeStatusBarWindowed = cbStatusBarWindowed.Checked; _config.DispChromeCaptionWindowed = cbCaptionWindowed.Checked; _config.DispChromeMenuWindowed = cbMenuWindowed.Checked; + _config.SaveWindowPosition = cbMainFormSaveWindowPosition.Checked; + _config.MainFormStayOnTop = cbMainFormStayOnTop.Checked; + Owner.TopMost = _config.MainFormStayOnTop; _config.DispChromeStatusBarFullscreen = cbStatusBarFullscreen.Checked; _config.DispChromeMenuFullscreen = cbMenuFullscreen.Checked; _config.DispChromeFrameWindowed = trackbarFrameSizeWindowed.Value; diff --git a/src/BizHawk.Client.EmuHawk/config/EmuHawkOptions.Designer.cs b/src/BizHawk.Client.EmuHawk/config/EmuHawkOptions.Designer.cs index 4da1a22080..22a8ec5917 100755 --- a/src/BizHawk.Client.EmuHawk/config/EmuHawkOptions.Designer.cs +++ b/src/BizHawk.Client.EmuHawk/config/EmuHawkOptions.Designer.cs @@ -40,7 +40,6 @@ this.AcceptBackgroundInputControllerOnlyCheckBox = new System.Windows.Forms.CheckBox(); this.label1 = new BizHawk.WinForms.Controls.LocLabelEx(); this.RunInBackgroundCheckbox = new System.Windows.Forms.CheckBox(); - this.SaveWindowPositionCheckbox = new System.Windows.Forms.CheckBox(); this.EnableContextMenuCheckbox = new System.Windows.Forms.CheckBox(); this.PauseWhenMenuActivatedCheckbox = new System.Windows.Forms.CheckBox(); this.groupBox3 = new System.Windows.Forms.GroupBox(); @@ -135,7 +134,6 @@ this.tabPage1.Controls.Add(this.AcceptBackgroundInputControllerOnlyCheckBox); this.tabPage1.Controls.Add(this.label1); this.tabPage1.Controls.Add(this.RunInBackgroundCheckbox); - this.tabPage1.Controls.Add(this.SaveWindowPositionCheckbox); this.tabPage1.Controls.Add(this.EnableContextMenuCheckbox); this.tabPage1.Controls.Add(this.PauseWhenMenuActivatedCheckbox); this.tabPage1.Controls.Add(this.groupBox3); @@ -212,16 +210,6 @@ this.RunInBackgroundCheckbox.Text = "Run in background"; this.RunInBackgroundCheckbox.UseVisualStyleBackColor = true; // - // SaveWindowPositionCheckbox - // - this.SaveWindowPositionCheckbox.AutoSize = true; - this.SaveWindowPositionCheckbox.Location = new System.Drawing.Point(196, 29); - this.SaveWindowPositionCheckbox.Name = "SaveWindowPositionCheckbox"; - this.SaveWindowPositionCheckbox.Size = new System.Drawing.Size(133, 17); - this.SaveWindowPositionCheckbox.TabIndex = 19; - this.SaveWindowPositionCheckbox.Text = "Save Window Position"; - this.SaveWindowPositionCheckbox.UseVisualStyleBackColor = true; - // // EnableContextMenuCheckbox // this.EnableContextMenuCheckbox.AutoSize = true; @@ -655,7 +643,6 @@ private System.Windows.Forms.CheckBox AcceptBackgroundInputControllerOnlyCheckBox; private BizHawk.WinForms.Controls.LocLabelEx label1; private System.Windows.Forms.CheckBox RunInBackgroundCheckbox; - private System.Windows.Forms.CheckBox SaveWindowPositionCheckbox; private System.Windows.Forms.CheckBox EnableContextMenuCheckbox; private System.Windows.Forms.CheckBox PauseWhenMenuActivatedCheckbox; private System.Windows.Forms.GroupBox groupBox3; diff --git a/src/BizHawk.Client.EmuHawk/config/EmuHawkOptions.cs b/src/BizHawk.Client.EmuHawk/config/EmuHawkOptions.cs old mode 100644 new mode 100755 index ef1251ce80..363b9ca5da --- a/src/BizHawk.Client.EmuHawk/config/EmuHawkOptions.cs +++ b/src/BizHawk.Client.EmuHawk/config/EmuHawkOptions.cs @@ -64,7 +64,6 @@ namespace BizHawk.Client.EmuHawk StartPausedCheckbox.Checked = _config.StartPaused; PauseWhenMenuActivatedCheckbox.Checked = _config.PauseWhenMenuActivated; EnableContextMenuCheckbox.Checked = _config.ShowContextMenu; - SaveWindowPositionCheckbox.Checked = _config.SaveWindowPosition; RunInBackgroundCheckbox.Checked = _config.RunInBackground; AcceptBackgroundInputCheckbox.Checked = _config.AcceptBackgroundInput; AcceptBackgroundInputControllerOnlyCheckBox.Checked = _config.AcceptBackgroundInputControllerOnly; @@ -128,7 +127,6 @@ namespace BizHawk.Client.EmuHawk _config.StartPaused = StartPausedCheckbox.Checked; _config.PauseWhenMenuActivated = PauseWhenMenuActivatedCheckbox.Checked; _config.ShowContextMenu = EnableContextMenuCheckbox.Checked; - _config.SaveWindowPosition = SaveWindowPositionCheckbox.Checked; _config.RunInBackground = RunInBackgroundCheckbox.Checked; _config.AcceptBackgroundInput = AcceptBackgroundInputCheckbox.Checked; _config.AcceptBackgroundInputControllerOnly = AcceptBackgroundInputControllerOnlyCheckBox.Checked;