From 74ba281463c4e2435d6083c98d9572cd9c10eecf Mon Sep 17 00:00:00 2001 From: zeromus Date: Tue, 5 May 2020 17:26:13 -0400 Subject: [PATCH] readd opentk/dinput options to gui --- .../config/EmuHawkOptions.Designer.cs | 454 ++++++++++-------- .../config/EmuHawkOptions.cs | 14 + 2 files changed, 262 insertions(+), 206 deletions(-) diff --git a/src/BizHawk.Client.EmuHawk/config/EmuHawkOptions.Designer.cs b/src/BizHawk.Client.EmuHawk/config/EmuHawkOptions.Designer.cs index 836b4994a6..5a20c625c8 100644 --- a/src/BizHawk.Client.EmuHawk/config/EmuHawkOptions.Designer.cs +++ b/src/BizHawk.Client.EmuHawk/config/EmuHawkOptions.Designer.cs @@ -33,22 +33,6 @@ this.CancelBtn = new System.Windows.Forms.Button(); this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabPage1 = new System.Windows.Forms.TabPage(); - this.HandleAlternateKeyboardLayoutsCheckBox = new System.Windows.Forms.CheckBox(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.StartPausedCheckbox = new System.Windows.Forms.CheckBox(); - this.label14 = new System.Windows.Forms.Label(); - this.StartFullScreenCheckbox = new System.Windows.Forms.CheckBox(); - this.label3 = new System.Windows.Forms.Label(); - this.SingleInstanceModeCheckbox = new System.Windows.Forms.CheckBox(); - this.NeverAskSaveCheckbox = new System.Windows.Forms.CheckBox(); - this.label2 = new System.Windows.Forms.Label(); - this.AcceptBackgroundInputCheckbox = new System.Windows.Forms.CheckBox(); - this.AcceptBackgroundInputControllerOnlyCheckBox = new System.Windows.Forms.CheckBox(); - this.label1 = new System.Windows.Forms.Label(); - 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.tabPage3 = new System.Windows.Forms.TabPage(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.label10 = new System.Windows.Forms.Label(); @@ -73,19 +57,39 @@ this.FrameAdvSkipLagCheckbox = new System.Windows.Forms.CheckBox(); this.BackupSRamCheckbox = new System.Windows.Forms.CheckBox(); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); + this.groupBox3 = new System.Windows.Forms.GroupBox(); + this.rbInputMethodOpenTK = new System.Windows.Forms.RadioButton(); + this.rbInputMethodDirectInput = new System.Windows.Forms.RadioButton(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.StartPausedCheckbox = new System.Windows.Forms.CheckBox(); + this.label14 = new System.Windows.Forms.Label(); + this.StartFullScreenCheckbox = new System.Windows.Forms.CheckBox(); + this.label3 = new System.Windows.Forms.Label(); + this.SingleInstanceModeCheckbox = new System.Windows.Forms.CheckBox(); + this.HandleAlternateKeyboardLayoutsCheckBox = new System.Windows.Forms.CheckBox(); + this.NeverAskSaveCheckbox = new System.Windows.Forms.CheckBox(); + this.label2 = new System.Windows.Forms.Label(); + this.AcceptBackgroundInputCheckbox = new System.Windows.Forms.CheckBox(); + this.AcceptBackgroundInputControllerOnlyCheckBox = new System.Windows.Forms.CheckBox(); + this.label1 = new System.Windows.Forms.Label(); + 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.tabControl1.SuspendLayout(); this.tabPage1.SuspendLayout(); - this.groupBox1.SuspendLayout(); this.tabPage3.SuspendLayout(); this.groupBox2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.AutosaveSRAMtextBox)).BeginInit(); this.panel1.SuspendLayout(); + this.groupBox3.SuspendLayout(); + this.groupBox1.SuspendLayout(); this.SuspendLayout(); // // OkBtn // this.OkBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.OkBtn.Location = new System.Drawing.Point(280, 425); + this.OkBtn.Location = new System.Drawing.Point(280, 398); this.OkBtn.Name = "OkBtn"; this.OkBtn.Size = new System.Drawing.Size(60, 23); this.OkBtn.TabIndex = 0; @@ -97,7 +101,7 @@ // this.CancelBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.CancelBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.CancelBtn.Location = new System.Drawing.Point(346, 425); + this.CancelBtn.Location = new System.Drawing.Point(346, 398); this.CancelBtn.Name = "CancelBtn"; this.CancelBtn.Size = new System.Drawing.Size(60, 23); this.CancelBtn.TabIndex = 1; @@ -115,13 +119,12 @@ this.tabControl1.Location = new System.Drawing.Point(12, 12); this.tabControl1.Name = "tabControl1"; this.tabControl1.SelectedIndex = 0; - this.tabControl1.Size = new System.Drawing.Size(394, 402); + this.tabControl1.Size = new System.Drawing.Size(394, 375); this.tabControl1.TabIndex = 2; // // tabPage1 // this.tabPage1.Controls.Add(this.HandleAlternateKeyboardLayoutsCheckBox); - this.tabPage1.Controls.Add(this.groupBox1); this.tabPage1.Controls.Add(this.NeverAskSaveCheckbox); this.tabPage1.Controls.Add(this.label2); this.tabPage1.Controls.Add(this.AcceptBackgroundInputCheckbox); @@ -131,176 +134,16 @@ this.tabPage1.Controls.Add(this.SaveWindowPositionCheckbox); this.tabPage1.Controls.Add(this.EnableContextMenuCheckbox); this.tabPage1.Controls.Add(this.PauseWhenMenuActivatedCheckbox); + this.tabPage1.Controls.Add(this.groupBox3); + this.tabPage1.Controls.Add(this.groupBox1); 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(386, 376); + this.tabPage1.Size = new System.Drawing.Size(386, 349); this.tabPage1.TabIndex = 0; this.tabPage1.Text = "General"; this.tabPage1.UseVisualStyleBackColor = true; // - // HandleAlternateKeyboardLayoutsCheckBox - // - this.HandleAlternateKeyboardLayoutsCheckBox.AutoSize = true; - this.HandleAlternateKeyboardLayoutsCheckBox.Location = new System.Drawing.Point(6, 175); - this.HandleAlternateKeyboardLayoutsCheckBox.Name = "HandleAlternateKeyboardLayoutsCheckBox"; - this.HandleAlternateKeyboardLayoutsCheckBox.Size = new System.Drawing.Size(320, 17); - this.HandleAlternateKeyboardLayoutsCheckBox.TabIndex = 11; - this.HandleAlternateKeyboardLayoutsCheckBox.Text = "Handle alternate keyboard layouts (e.g. Dvorak) [experimental]"; - this.HandleAlternateKeyboardLayoutsCheckBox.UseVisualStyleBackColor = true; - // - // groupBox1 - // - this.groupBox1.Controls.Add(this.StartPausedCheckbox); - this.groupBox1.Controls.Add(this.label14); - this.groupBox1.Controls.Add(this.StartFullScreenCheckbox); - this.groupBox1.Controls.Add(this.label3); - this.groupBox1.Controls.Add(this.SingleInstanceModeCheckbox); - this.groupBox1.Location = new System.Drawing.Point(6, 205); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(369, 140); - this.groupBox1.TabIndex = 13; - this.groupBox1.TabStop = false; - this.groupBox1.Text = "Startup Options"; - // - // StartPausedCheckbox - // - this.StartPausedCheckbox.AutoSize = true; - this.StartPausedCheckbox.Location = new System.Drawing.Point(6, 19); - this.StartPausedCheckbox.Name = "StartPausedCheckbox"; - this.StartPausedCheckbox.Size = new System.Drawing.Size(86, 17); - this.StartPausedCheckbox.TabIndex = 2; - this.StartPausedCheckbox.Text = "Start paused"; - this.StartPausedCheckbox.UseVisualStyleBackColor = true; - // - // label14 - // - this.label14.AutoSize = true; - this.label14.Location = new System.Drawing.Point(26, 99); - this.label14.Name = "label14"; - this.label14.Size = new System.Drawing.Size(306, 13); - this.label14.TabIndex = 12; - this.label14.Text = "Note: Requires closing and reopening EmuHawk to take effect."; - // - // StartFullScreenCheckbox - // - this.StartFullScreenCheckbox.AutoSize = true; - this.StartFullScreenCheckbox.Location = new System.Drawing.Point(6, 42); - this.StartFullScreenCheckbox.Name = "StartFullScreenCheckbox"; - this.StartFullScreenCheckbox.Size = new System.Drawing.Size(110, 17); - this.StartFullScreenCheckbox.TabIndex = 3; - this.StartFullScreenCheckbox.Text = "Start in Fullscreen"; - this.StartFullScreenCheckbox.UseVisualStyleBackColor = true; - // - // label3 - // - this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(26, 85); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(275, 13); - this.label3.TabIndex = 11; - this.label3.Text = "Enable to force only one instance of EmuHawk at a time."; - // - // SingleInstanceModeCheckbox - // - this.SingleInstanceModeCheckbox.AutoSize = true; - this.SingleInstanceModeCheckbox.Location = new System.Drawing.Point(6, 65); - this.SingleInstanceModeCheckbox.Name = "SingleInstanceModeCheckbox"; - this.SingleInstanceModeCheckbox.Size = new System.Drawing.Size(127, 17); - this.SingleInstanceModeCheckbox.TabIndex = 10; - this.SingleInstanceModeCheckbox.Text = "Single instance mode"; - this.SingleInstanceModeCheckbox.UseVisualStyleBackColor = true; - // - // NeverAskSaveCheckbox - // - this.NeverAskSaveCheckbox.AutoSize = true; - this.NeverAskSaveCheckbox.Location = new System.Drawing.Point(6, 72); - this.NeverAskSaveCheckbox.Name = "NeverAskSaveCheckbox"; - this.NeverAskSaveCheckbox.Size = new System.Drawing.Size(184, 17); - this.NeverAskSaveCheckbox.TabIndex = 5; - this.NeverAskSaveCheckbox.Text = "Never be asked to save changes"; - this.NeverAskSaveCheckbox.UseVisualStyleBackColor = true; - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(26, 155); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(349, 13); - this.label2.TabIndex = 10; - this.label2.Text = "When this is set, the client will receive user input even when focus is lost"; - // - // AcceptBackgroundInputCheckbox - // - this.AcceptBackgroundInputCheckbox.AutoSize = true; - this.AcceptBackgroundInputCheckbox.Location = new System.Drawing.Point(6, 135); - this.AcceptBackgroundInputCheckbox.Name = "AcceptBackgroundInputCheckbox"; - this.AcceptBackgroundInputCheckbox.Size = new System.Drawing.Size(146, 17); - this.AcceptBackgroundInputCheckbox.TabIndex = 8; - this.AcceptBackgroundInputCheckbox.Text = "Accept background input"; - this.AcceptBackgroundInputCheckbox.UseVisualStyleBackColor = true; - this.AcceptBackgroundInputCheckbox.CheckedChanged += new System.EventHandler(this.AcceptBackgroundInputCheckbox_CheckedChanged); - // - // AcceptBackgroundInputControllerOnlyCheckBox - // - this.AcceptBackgroundInputControllerOnlyCheckBox.AutoSize = true; - this.AcceptBackgroundInputControllerOnlyCheckBox.Enabled = false; - this.AcceptBackgroundInputControllerOnlyCheckBox.Location = new System.Drawing.Point(156, 135); - this.AcceptBackgroundInputControllerOnlyCheckBox.Name = "AcceptBackgroundInputControllerOnlyCheckBox"; - this.AcceptBackgroundInputControllerOnlyCheckBox.Size = new System.Drawing.Size(117, 17); - this.AcceptBackgroundInputControllerOnlyCheckBox.TabIndex = 9; - this.AcceptBackgroundInputControllerOnlyCheckBox.Text = "From controller only"; - this.AcceptBackgroundInputControllerOnlyCheckBox.UseVisualStyleBackColor = true; - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(26, 115); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(315, 13); - this.label1.TabIndex = 7; - this.label1.Text = "When this is set, the client will continue to run when it loses focus"; - // - // RunInBackgroundCheckbox - // - this.RunInBackgroundCheckbox.AutoSize = true; - this.RunInBackgroundCheckbox.Location = new System.Drawing.Point(6, 95); - this.RunInBackgroundCheckbox.Name = "RunInBackgroundCheckbox"; - this.RunInBackgroundCheckbox.Size = new System.Drawing.Size(117, 17); - this.RunInBackgroundCheckbox.TabIndex = 6; - this.RunInBackgroundCheckbox.Text = "Run in background"; - this.RunInBackgroundCheckbox.UseVisualStyleBackColor = true; - // - // SaveWindowPositionCheckbox - // - this.SaveWindowPositionCheckbox.AutoSize = true; - this.SaveWindowPositionCheckbox.Location = new System.Drawing.Point(6, 49); - this.SaveWindowPositionCheckbox.Name = "SaveWindowPositionCheckbox"; - this.SaveWindowPositionCheckbox.Size = new System.Drawing.Size(133, 17); - this.SaveWindowPositionCheckbox.TabIndex = 4; - this.SaveWindowPositionCheckbox.Text = "Save Window Position"; - this.SaveWindowPositionCheckbox.UseVisualStyleBackColor = true; - // - // EnableContextMenuCheckbox - // - this.EnableContextMenuCheckbox.AutoSize = true; - this.EnableContextMenuCheckbox.Location = new System.Drawing.Point(6, 26); - this.EnableContextMenuCheckbox.Name = "EnableContextMenuCheckbox"; - this.EnableContextMenuCheckbox.Size = new System.Drawing.Size(128, 17); - this.EnableContextMenuCheckbox.TabIndex = 1; - this.EnableContextMenuCheckbox.Text = "Enable Context Menu"; - this.EnableContextMenuCheckbox.UseVisualStyleBackColor = true; - // - // PauseWhenMenuActivatedCheckbox - // - this.PauseWhenMenuActivatedCheckbox.AutoSize = true; - this.PauseWhenMenuActivatedCheckbox.Location = new System.Drawing.Point(6, 3); - this.PauseWhenMenuActivatedCheckbox.Name = "PauseWhenMenuActivatedCheckbox"; - this.PauseWhenMenuActivatedCheckbox.Size = new System.Drawing.Size(161, 17); - this.PauseWhenMenuActivatedCheckbox.TabIndex = 0; - this.PauseWhenMenuActivatedCheckbox.Text = "Pause when menu activated"; - this.PauseWhenMenuActivatedCheckbox.UseVisualStyleBackColor = true; - // // tabPage3 // this.tabPage3.Controls.Add(this.groupBox2); @@ -317,7 +160,7 @@ this.tabPage3.Controls.Add(this.BackupSRamCheckbox); this.tabPage3.Location = new System.Drawing.Point(4, 22); this.tabPage3.Name = "tabPage3"; - this.tabPage3.Size = new System.Drawing.Size(386, 376); + this.tabPage3.Size = new System.Drawing.Size(386, 349); this.tabPage3.TabIndex = 2; this.tabPage3.Text = "Advanced"; this.tabPage3.UseVisualStyleBackColor = true; @@ -426,7 +269,7 @@ this.panel1.Controls.Add(this.label7); this.panel1.Controls.Add(this.LuaInterfaceRadio); this.panel1.Controls.Add(this.NLuaRadio); - this.panel1.Location = new System.Drawing.Point(6, 312); + this.panel1.Location = new System.Drawing.Point(6, 285); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(377, 61); this.panel1.TabIndex = 20; @@ -550,13 +393,207 @@ this.BackupSRamCheckbox.Text = "Backup SaveRAM to .SaveRAM.bak"; this.BackupSRamCheckbox.UseVisualStyleBackColor = true; // + // groupBox3 + // + this.groupBox3.Controls.Add(this.rbInputMethodOpenTK); + this.groupBox3.Controls.Add(this.rbInputMethodDirectInput); + this.groupBox3.Location = new System.Drawing.Point(6, 151); + this.groupBox3.Name = "groupBox3"; + this.groupBox3.Size = new System.Drawing.Size(369, 48); + this.groupBox3.TabIndex = 16; + this.groupBox3.TabStop = false; + this.groupBox3.Text = "Input Method (requires restart)"; + // + // rbInputMethodOpenTK + // + this.rbInputMethodOpenTK.AutoSize = true; + this.rbInputMethodOpenTK.Location = new System.Drawing.Point(136, 19); + this.rbInputMethodOpenTK.Name = "rbInputMethodOpenTK"; + this.rbInputMethodOpenTK.Size = new System.Drawing.Size(65, 17); + this.rbInputMethodOpenTK.TabIndex = 1; + this.rbInputMethodOpenTK.TabStop = true; + this.rbInputMethodOpenTK.Text = "OpenTK"; + this.rbInputMethodOpenTK.UseVisualStyleBackColor = true; + // + // rbInputMethodDirectInput + // + this.rbInputMethodDirectInput.AutoSize = true; + this.rbInputMethodDirectInput.Location = new System.Drawing.Point(7, 20); + this.rbInputMethodDirectInput.Name = "rbInputMethodDirectInput"; + this.rbInputMethodDirectInput.Size = new System.Drawing.Size(114, 17); + this.rbInputMethodDirectInput.TabIndex = 0; + this.rbInputMethodDirectInput.TabStop = true; + this.rbInputMethodDirectInput.Text = "DirectInput+XInput"; + this.rbInputMethodDirectInput.UseVisualStyleBackColor = true; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.StartPausedCheckbox); + this.groupBox1.Controls.Add(this.label14); + this.groupBox1.Controls.Add(this.StartFullScreenCheckbox); + this.groupBox1.Controls.Add(this.label3); + this.groupBox1.Controls.Add(this.SingleInstanceModeCheckbox); + this.groupBox1.Location = new System.Drawing.Point(6, 205); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(369, 121); + this.groupBox1.TabIndex = 15; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "Startup Options"; + // + // StartPausedCheckbox + // + this.StartPausedCheckbox.AutoSize = true; + this.StartPausedCheckbox.Location = new System.Drawing.Point(6, 19); + this.StartPausedCheckbox.Name = "StartPausedCheckbox"; + this.StartPausedCheckbox.Size = new System.Drawing.Size(86, 17); + this.StartPausedCheckbox.TabIndex = 2; + this.StartPausedCheckbox.Text = "Start paused"; + this.StartPausedCheckbox.UseVisualStyleBackColor = true; + // + // label14 + // + this.label14.AutoSize = true; + this.label14.Location = new System.Drawing.Point(26, 99); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(306, 13); + this.label14.TabIndex = 12; + this.label14.Text = "Note: Requires closing and reopening EmuHawk to take effect."; + // + // StartFullScreenCheckbox + // + this.StartFullScreenCheckbox.AutoSize = true; + this.StartFullScreenCheckbox.Location = new System.Drawing.Point(6, 42); + this.StartFullScreenCheckbox.Name = "StartFullScreenCheckbox"; + this.StartFullScreenCheckbox.Size = new System.Drawing.Size(110, 17); + this.StartFullScreenCheckbox.TabIndex = 3; + this.StartFullScreenCheckbox.Text = "Start in Fullscreen"; + this.StartFullScreenCheckbox.UseVisualStyleBackColor = true; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(26, 85); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(275, 13); + this.label3.TabIndex = 11; + this.label3.Text = "Enable to force only one instance of EmuHawk at a time."; + // + // SingleInstanceModeCheckbox + // + this.SingleInstanceModeCheckbox.AutoSize = true; + this.SingleInstanceModeCheckbox.Location = new System.Drawing.Point(6, 65); + this.SingleInstanceModeCheckbox.Name = "SingleInstanceModeCheckbox"; + this.SingleInstanceModeCheckbox.Size = new System.Drawing.Size(127, 17); + this.SingleInstanceModeCheckbox.TabIndex = 10; + this.SingleInstanceModeCheckbox.Text = "Single instance mode"; + this.SingleInstanceModeCheckbox.UseVisualStyleBackColor = true; + // + // HandleAlternateKeyboardLayoutsCheckBox + // + this.HandleAlternateKeyboardLayoutsCheckBox.AutoSize = true; + this.HandleAlternateKeyboardLayoutsCheckBox.Location = new System.Drawing.Point(7, 128); + this.HandleAlternateKeyboardLayoutsCheckBox.Name = "HandleAlternateKeyboardLayoutsCheckBox"; + this.HandleAlternateKeyboardLayoutsCheckBox.Size = new System.Drawing.Size(320, 17); + this.HandleAlternateKeyboardLayoutsCheckBox.TabIndex = 26; + this.HandleAlternateKeyboardLayoutsCheckBox.Text = "Handle alternate keyboard layouts (e.g. Dvorak) [experimental]"; + this.HandleAlternateKeyboardLayoutsCheckBox.UseVisualStyleBackColor = true; + // + // NeverAskSaveCheckbox + // + this.NeverAskSaveCheckbox.AutoSize = true; + this.NeverAskSaveCheckbox.Location = new System.Drawing.Point(6, 29); + this.NeverAskSaveCheckbox.Name = "NeverAskSaveCheckbox"; + this.NeverAskSaveCheckbox.Size = new System.Drawing.Size(184, 17); + this.NeverAskSaveCheckbox.TabIndex = 20; + this.NeverAskSaveCheckbox.Text = "Never be asked to save changes"; + this.NeverAskSaveCheckbox.UseVisualStyleBackColor = true; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(26, 112); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(349, 13); + this.label2.TabIndex = 25; + this.label2.Text = "When this is set, the client will receive user input even when focus is lost"; + // + // AcceptBackgroundInputCheckbox + // + this.AcceptBackgroundInputCheckbox.AutoSize = true; + this.AcceptBackgroundInputCheckbox.Location = new System.Drawing.Point(6, 92); + this.AcceptBackgroundInputCheckbox.Name = "AcceptBackgroundInputCheckbox"; + this.AcceptBackgroundInputCheckbox.Size = new System.Drawing.Size(146, 17); + this.AcceptBackgroundInputCheckbox.TabIndex = 23; + this.AcceptBackgroundInputCheckbox.Text = "Accept background input"; + this.AcceptBackgroundInputCheckbox.UseVisualStyleBackColor = true; + // + // AcceptBackgroundInputControllerOnlyCheckBox + // + this.AcceptBackgroundInputControllerOnlyCheckBox.AutoSize = true; + this.AcceptBackgroundInputControllerOnlyCheckBox.Enabled = false; + this.AcceptBackgroundInputControllerOnlyCheckBox.Location = new System.Drawing.Point(156, 92); + this.AcceptBackgroundInputControllerOnlyCheckBox.Name = "AcceptBackgroundInputControllerOnlyCheckBox"; + this.AcceptBackgroundInputControllerOnlyCheckBox.Size = new System.Drawing.Size(117, 17); + this.AcceptBackgroundInputControllerOnlyCheckBox.TabIndex = 24; + this.AcceptBackgroundInputControllerOnlyCheckBox.Text = "From controller only"; + this.AcceptBackgroundInputControllerOnlyCheckBox.UseVisualStyleBackColor = true; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(26, 72); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(315, 13); + this.label1.TabIndex = 22; + this.label1.Text = "When this is set, the client will continue to run when it loses focus"; + // + // RunInBackgroundCheckbox + // + this.RunInBackgroundCheckbox.AutoSize = true; + this.RunInBackgroundCheckbox.Location = new System.Drawing.Point(6, 52); + this.RunInBackgroundCheckbox.Name = "RunInBackgroundCheckbox"; + this.RunInBackgroundCheckbox.Size = new System.Drawing.Size(117, 17); + this.RunInBackgroundCheckbox.TabIndex = 21; + 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; + this.EnableContextMenuCheckbox.Location = new System.Drawing.Point(196, 6); + this.EnableContextMenuCheckbox.Name = "EnableContextMenuCheckbox"; + this.EnableContextMenuCheckbox.Size = new System.Drawing.Size(128, 17); + this.EnableContextMenuCheckbox.TabIndex = 18; + this.EnableContextMenuCheckbox.Text = "Enable Context Menu"; + this.EnableContextMenuCheckbox.UseVisualStyleBackColor = true; + // + // PauseWhenMenuActivatedCheckbox + // + this.PauseWhenMenuActivatedCheckbox.AutoSize = true; + this.PauseWhenMenuActivatedCheckbox.Location = new System.Drawing.Point(6, 6); + this.PauseWhenMenuActivatedCheckbox.Name = "PauseWhenMenuActivatedCheckbox"; + this.PauseWhenMenuActivatedCheckbox.Size = new System.Drawing.Size(161, 17); + this.PauseWhenMenuActivatedCheckbox.TabIndex = 17; + this.PauseWhenMenuActivatedCheckbox.Text = "Pause when menu activated"; + this.PauseWhenMenuActivatedCheckbox.UseVisualStyleBackColor = true; + // // EmuHawkOptions // this.AcceptButton = this.OkBtn; this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.CancelButton = this.CancelBtn; - this.ClientSize = new System.Drawing.Size(418, 455); + this.ClientSize = new System.Drawing.Size(418, 428); this.Controls.Add(this.tabControl1); this.Controls.Add(this.CancelBtn); this.Controls.Add(this.OkBtn); @@ -568,8 +605,6 @@ this.tabControl1.ResumeLayout(false); this.tabPage1.ResumeLayout(false); this.tabPage1.PerformLayout(); - this.groupBox1.ResumeLayout(false); - this.groupBox1.PerformLayout(); this.tabPage3.ResumeLayout(false); this.tabPage3.PerformLayout(); this.groupBox2.ResumeLayout(false); @@ -577,6 +612,10 @@ ((System.ComponentModel.ISupportInitialize)(this.AutosaveSRAMtextBox)).EndInit(); this.panel1.ResumeLayout(false); this.panel1.PerformLayout(); + this.groupBox3.ResumeLayout(false); + this.groupBox3.PerformLayout(); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); this.ResumeLayout(false); } @@ -587,28 +626,13 @@ private System.Windows.Forms.Button CancelBtn; private System.Windows.Forms.TabControl tabControl1; private System.Windows.Forms.TabPage tabPage1; - private System.Windows.Forms.CheckBox StartPausedCheckbox; - private System.Windows.Forms.CheckBox PauseWhenMenuActivatedCheckbox; - private System.Windows.Forms.CheckBox EnableContextMenuCheckbox; - private System.Windows.Forms.CheckBox SaveWindowPositionCheckbox; - private System.Windows.Forms.CheckBox RunInBackgroundCheckbox; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.Label label2; - private System.Windows.Forms.CheckBox AcceptBackgroundInputCheckbox; - private System.Windows.Forms.CheckBox AcceptBackgroundInputControllerOnlyCheckBox; - private System.Windows.Forms.CheckBox NeverAskSaveCheckbox; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.CheckBox SingleInstanceModeCheckbox; private System.Windows.Forms.TabPage tabPage3; private System.Windows.Forms.ToolTip toolTip1; private System.Windows.Forms.CheckBox BackupSRamCheckbox; private System.Windows.Forms.CheckBox FrameAdvSkipLagCheckbox; private System.Windows.Forms.Label label12; private System.Windows.Forms.Label label13; - private System.Windows.Forms.Label label14; - private System.Windows.Forms.CheckBox StartFullScreenCheckbox; private System.Windows.Forms.CheckBox LuaDuringTurboCheckbox; - private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.Label label5; private System.Windows.Forms.CheckBox cbMoviesOnDisk; private System.Windows.Forms.Label label6; @@ -625,7 +649,25 @@ private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.NumericUpDown AutosaveSRAMtextBox; private System.Windows.Forms.Label label10; - private System.Windows.Forms.Label label9; - private System.Windows.Forms.CheckBox HandleAlternateKeyboardLayoutsCheckBox; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.CheckBox HandleAlternateKeyboardLayoutsCheckBox; + private System.Windows.Forms.CheckBox NeverAskSaveCheckbox; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.CheckBox AcceptBackgroundInputCheckbox; + private System.Windows.Forms.CheckBox AcceptBackgroundInputControllerOnlyCheckBox; + private System.Windows.Forms.Label 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; + private System.Windows.Forms.RadioButton rbInputMethodOpenTK; + private System.Windows.Forms.RadioButton rbInputMethodDirectInput; + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.CheckBox StartPausedCheckbox; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.CheckBox StartFullScreenCheckbox; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.CheckBox SingleInstanceModeCheckbox; } } \ No newline at end of file diff --git a/src/BizHawk.Client.EmuHawk/config/EmuHawkOptions.cs b/src/BizHawk.Client.EmuHawk/config/EmuHawkOptions.cs index 30dfd9bd39..03ce6ebd50 100644 --- a/src/BizHawk.Client.EmuHawk/config/EmuHawkOptions.cs +++ b/src/BizHawk.Client.EmuHawk/config/EmuHawkOptions.cs @@ -77,6 +77,18 @@ namespace BizHawk.Client.EmuHawk cbMoviesOnDisk.Checked = _config.MoviesOnDisk; cbSkipWaterboxIntegrityChecks.Checked = _config.SkipWaterboxIntegrityChecks; + switch (_config.HostInputMethod) + { + case EHostInputMethod.OpenTK: + rbInputMethodOpenTK.Checked = true; + break; + case EHostInputMethod.DirectInput: + rbInputMethodDirectInput.Checked = true; + break; + default: + throw new InvalidOperationException(); + } + switch (_config.LuaEngine) { case ELuaEngine.LuaPlusLuaInterface: @@ -103,6 +115,8 @@ namespace BizHawk.Client.EmuHawk _config.HandleAlternateKeyboardLayouts = HandleAlternateKeyboardLayoutsCheckBox.Checked; _config.SuppressAskSave = NeverAskSaveCheckbox.Checked; _config.SingleInstanceMode = SingleInstanceModeCheckbox.Checked; + if(rbInputMethodDirectInput.Checked) _config.HostInputMethod = EHostInputMethod.DirectInput; + if(rbInputMethodOpenTK.Checked) _config.HostInputMethod = EHostInputMethod.OpenTK; _config.BackupSaveram = BackupSRamCheckbox.Checked; _config.AutosaveSaveRAM = AutosaveSRAMCheckbox.Checked;