mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-05 20:54:31 +13:00
Removed Aero auto close setting, not possible to disable Aero in Windows 8.1 with DwmEnableComposition function
This commit is contained in:
parent
c2787a017b
commit
5ec02bcf6a
11 changed files with 18 additions and 97 deletions
|
@ -56,7 +56,6 @@ public static ScreenRecordForm Instance
|
|||
|
||||
private ScreenRecorder screenRecorder;
|
||||
private ScreenRegionForm regionForm;
|
||||
private DWMManager dwmManager;
|
||||
private bool abortRequested;
|
||||
|
||||
private ScreenRecordForm()
|
||||
|
@ -176,12 +175,6 @@ public void StartRecording(ScreenRecordOutput outputType, TaskSettings taskSetti
|
|||
{
|
||||
try
|
||||
{
|
||||
if (taskSettings.CaptureSettings.ScreenRecordAutoDisableAero)
|
||||
{
|
||||
dwmManager = new DWMManager();
|
||||
dwmManager.AutoDisable();
|
||||
}
|
||||
|
||||
if (outputType == ScreenRecordOutput.FFmpeg)
|
||||
{
|
||||
path = Path.Combine(taskSettings.CaptureFolder, TaskHelpers.GetFilename(taskSettings, taskSettings.CaptureSettings.FFmpegOptions.Extension));
|
||||
|
@ -254,12 +247,6 @@ public void StartRecording(ScreenRecordOutput outputType, TaskSettings taskSetti
|
|||
}
|
||||
finally
|
||||
{
|
||||
if (dwmManager != null)
|
||||
{
|
||||
dwmManager.Dispose();
|
||||
dwmManager = null;
|
||||
}
|
||||
|
||||
if (regionForm != null)
|
||||
{
|
||||
if (regionForm.RecordResetEvent != null)
|
||||
|
|
10
ShareX/Forms/TaskSettingsForm.Designer.cs
generated
10
ShareX/Forms/TaskSettingsForm.Designer.cs
generated
|
@ -119,7 +119,6 @@ private void InitializeComponent()
|
|||
this.btnScreenRecorderFFmpegOptions = new System.Windows.Forms.Button();
|
||||
this.lblScreenRecorderStartDelay = new System.Windows.Forms.Label();
|
||||
this.chkScreenRecordAutoStart = new System.Windows.Forms.CheckBox();
|
||||
this.cbScreenRecordAutoDisableAero = new System.Windows.Forms.CheckBox();
|
||||
this.lblScreenRecorderFixedDuration = new System.Windows.Forms.Label();
|
||||
this.nudScreenRecordFPS = new System.Windows.Forms.NumericUpDown();
|
||||
this.lblScreenRecordFPS = new System.Windows.Forms.Label();
|
||||
|
@ -896,7 +895,6 @@ private void InitializeComponent()
|
|||
this.tpScreenRecorder.Controls.Add(this.btnScreenRecorderFFmpegOptions);
|
||||
this.tpScreenRecorder.Controls.Add(this.lblScreenRecorderStartDelay);
|
||||
this.tpScreenRecorder.Controls.Add(this.chkScreenRecordAutoStart);
|
||||
this.tpScreenRecorder.Controls.Add(this.cbScreenRecordAutoDisableAero);
|
||||
this.tpScreenRecorder.Controls.Add(this.lblScreenRecorderFixedDuration);
|
||||
this.tpScreenRecorder.Controls.Add(this.nudScreenRecordFPS);
|
||||
this.tpScreenRecorder.Controls.Add(this.lblScreenRecordFPS);
|
||||
|
@ -931,13 +929,6 @@ private void InitializeComponent()
|
|||
this.chkScreenRecordAutoStart.UseVisualStyleBackColor = true;
|
||||
this.chkScreenRecordAutoStart.CheckedChanged += new System.EventHandler(this.chkScreenRecordAutoStart_CheckedChanged);
|
||||
//
|
||||
// cbScreenRecordAutoDisableAero
|
||||
//
|
||||
resources.ApplyResources(this.cbScreenRecordAutoDisableAero, "cbScreenRecordAutoDisableAero");
|
||||
this.cbScreenRecordAutoDisableAero.Name = "cbScreenRecordAutoDisableAero";
|
||||
this.cbScreenRecordAutoDisableAero.UseVisualStyleBackColor = true;
|
||||
this.cbScreenRecordAutoDisableAero.CheckedChanged += new System.EventHandler(this.cbScreenRecordAutoDisableAero_CheckedChanged);
|
||||
//
|
||||
// lblScreenRecorderFixedDuration
|
||||
//
|
||||
resources.ApplyResources(this.lblScreenRecorderFixedDuration, "lblScreenRecorderFixedDuration");
|
||||
|
@ -1623,7 +1614,6 @@ private void InitializeComponent()
|
|||
private System.Windows.Forms.Label lblScreenRecordFPS;
|
||||
private System.Windows.Forms.CheckBox chkShowBeforeUploadForm;
|
||||
private System.Windows.Forms.Label lblScreenRecorderFixedDuration;
|
||||
private System.Windows.Forms.CheckBox cbScreenRecordAutoDisableAero;
|
||||
private System.Windows.Forms.CheckBox cbClipboardUploadShareURL;
|
||||
private System.Windows.Forms.TabPage tpRectangleAnnotate;
|
||||
private System.Windows.Forms.PropertyGrid pgRectangleAnnotate;
|
||||
|
|
|
@ -219,15 +219,14 @@ public TaskSettingsForm(TaskSettings hotkeySetting, bool isDefault = false)
|
|||
pgRectangleAnnotate.SelectedObject = TaskSettings.CaptureSettings.RectangleAnnotateOptions;
|
||||
|
||||
// Capture / Screen recorder
|
||||
chkRunScreencastCLI.Checked = cboEncoder.Enabled = btnEncoderConfig.Enabled = TaskSettings.CaptureSettings.RunScreencastCLI;
|
||||
UpdateVideoEncoders();
|
||||
nudScreenRecordFPS.Value = TaskSettings.CaptureSettings.ScreenRecordFPS.Between((int)nudScreenRecordFPS.Minimum, (int)nudScreenRecordFPS.Maximum);
|
||||
nudGIFFPS.Value = TaskSettings.CaptureSettings.GIFFPS.Between((int)nudGIFFPS.Minimum, (int)nudGIFFPS.Maximum);
|
||||
cbScreenRecorderFixedDuration.Checked = nudScreenRecorderDuration.Enabled = TaskSettings.CaptureSettings.ScreenRecordFixedDuration;
|
||||
nudScreenRecorderDuration.Value = (decimal)TaskSettings.CaptureSettings.ScreenRecordDuration;
|
||||
chkScreenRecordAutoStart.Checked = nudScreenRecorderStartDelay.Enabled = TaskSettings.CaptureSettings.ScreenRecordAutoStart;
|
||||
nudScreenRecorderStartDelay.Value = (decimal)TaskSettings.CaptureSettings.ScreenRecordStartDelay;
|
||||
cbScreenRecordAutoDisableAero.Checked = TaskSettings.CaptureSettings.ScreenRecordAutoDisableAero;
|
||||
chkRunScreencastCLI.Checked = cboEncoder.Enabled = btnEncoderConfig.Enabled = TaskSettings.CaptureSettings.RunScreencastCLI;
|
||||
UpdateVideoEncoders();
|
||||
|
||||
// Actions
|
||||
TaskHelpers.AddDefaultExternalPrograms(TaskSettings);
|
||||
|
@ -820,11 +819,6 @@ private void nudScreenRecorderStartDelay_ValueChanged(object sender, EventArgs e
|
|||
TaskSettings.CaptureSettings.ScreenRecordStartDelay = (float)nudScreenRecorderStartDelay.Value;
|
||||
}
|
||||
|
||||
private void cbScreenRecordAutoDisableAero_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
TaskSettings.CaptureSettings.ScreenRecordAutoDisableAero = cbScreenRecordAutoDisableAero.Checked;
|
||||
}
|
||||
|
||||
#endregion Screen recorder
|
||||
|
||||
#region Actions
|
||||
|
|
|
@ -195,9 +195,6 @@
|
|||
<data name="cbPlaySoundAfterUpload.Text" xml:space="preserve">
|
||||
<value>Přehrát zvuk po dokončení úkolu</value>
|
||||
</data>
|
||||
<data name="cbScreenRecordAutoDisableAero.Text" xml:space="preserve">
|
||||
<value>Automaticky zakázat Windows Aero při nahrávání (Aero snižuje výkon při nahrávání)</value>
|
||||
</data>
|
||||
<data name="cbScreenRecorderFixedDuration.Text" xml:space="preserve">
|
||||
<value>Fixní délka:</value>
|
||||
</data>
|
||||
|
|
|
@ -195,9 +195,6 @@
|
|||
<data name="cbPlaySoundAfterUpload.Text" xml:space="preserve">
|
||||
<value>Spiele Ton nachdem eine Aufgabe beendet wurde</value>
|
||||
</data>
|
||||
<data name="cbScreenRecordAutoDisableAero.Text" xml:space="preserve">
|
||||
<value>Deaktiviere Windows Aero während der Aufnahme</value>
|
||||
</data>
|
||||
<data name="cbScreenRecorderFixedDuration.Text" xml:space="preserve">
|
||||
<value>Gesetzte Dauer:</value>
|
||||
</data>
|
||||
|
|
|
@ -144,10 +144,6 @@
|
|||
<data name="btnAfterUpload.Text" xml:space="preserve">
|
||||
<value>Après la mise en ligne...</value>
|
||||
</data>
|
||||
<data name="cbScreenRecordAutoDisableAero.Text" xml:space="preserve">
|
||||
<value>Désactivation automatique de Windows Aéro pendant l'enregistrement.
|
||||
(Windows Aéro abaisse les performances d'enregistrement.)</value>
|
||||
</data>
|
||||
<data name="cbCaptureClientArea.Text" xml:space="preserve">
|
||||
<value>Zone de capture client pendant les captures "fenêtre" ou "fenêtre active"</value>
|
||||
</data>
|
||||
|
|
|
@ -195,9 +195,6 @@
|
|||
<data name="cbPlaySoundAfterUpload.Text" xml:space="preserve">
|
||||
<value>Hang lejátszása a feladat befejeztekor</value>
|
||||
</data>
|
||||
<data name="cbScreenRecordAutoDisableAero.Text" xml:space="preserve">
|
||||
<value>A Windows Aero automatikus kikapcsolása felvétel közben (az Aero csökkent teljesítményt eredményez)</value>
|
||||
</data>
|
||||
<data name="cbScreenRecorderFixedDuration.Text" xml:space="preserve">
|
||||
<value>Fix hossz:</value>
|
||||
</data>
|
||||
|
|
|
@ -2307,36 +2307,6 @@
|
|||
<data name=">>chkScreenRecordAutoStart.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="cbScreenRecordAutoDisableAero.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="cbScreenRecordAutoDisableAero.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="cbScreenRecordAutoDisableAero.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>8, 136</value>
|
||||
</data>
|
||||
<data name="cbScreenRecordAutoDisableAero.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>465, 17</value>
|
||||
</data>
|
||||
<data name="cbScreenRecordAutoDisableAero.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>15</value>
|
||||
</data>
|
||||
<data name="cbScreenRecordAutoDisableAero.Text" xml:space="preserve">
|
||||
<value>Automatically disable Windows Aero while recording (Aero decreasing recording performance)</value>
|
||||
</data>
|
||||
<data name=">>cbScreenRecordAutoDisableAero.Name" xml:space="preserve">
|
||||
<value>cbScreenRecordAutoDisableAero</value>
|
||||
</data>
|
||||
<data name=">>cbScreenRecordAutoDisableAero.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>cbScreenRecordAutoDisableAero.Parent" xml:space="preserve">
|
||||
<value>tpScreenRecorder</value>
|
||||
</data>
|
||||
<data name=">>cbScreenRecordAutoDisableAero.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="lblScreenRecorderFixedDuration.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
|
@ -2365,7 +2335,7 @@
|
|||
<value>tpScreenRecorder</value>
|
||||
</data>
|
||||
<data name=">>lblScreenRecorderFixedDuration.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="nudScreenRecordFPS.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>232, 36</value>
|
||||
|
@ -2389,7 +2359,7 @@
|
|||
<value>tpScreenRecorder</value>
|
||||
</data>
|
||||
<data name=">>nudScreenRecordFPS.ZOrder" xml:space="preserve">
|
||||
<value>5</value>
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="lblScreenRecordFPS.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
|
@ -2419,7 +2389,7 @@
|
|||
<value>tpScreenRecorder</value>
|
||||
</data>
|
||||
<data name=">>lblScreenRecordFPS.ZOrder" xml:space="preserve">
|
||||
<value>6</value>
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="chkRunScreencastCLI.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
|
@ -2428,7 +2398,7 @@
|
|||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="chkRunScreencastCLI.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>8, 160</value>
|
||||
<value>8, 136</value>
|
||||
</data>
|
||||
<data name="chkRunScreencastCLI.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>120, 17</value>
|
||||
|
@ -2449,13 +2419,13 @@
|
|||
<value>tpScreenRecorder</value>
|
||||
</data>
|
||||
<data name=">>chkRunScreencastCLI.ZOrder" xml:space="preserve">
|
||||
<value>7</value>
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name="btnEncoderConfig.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="btnEncoderConfig.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>458, 157</value>
|
||||
<value>458, 133</value>
|
||||
</data>
|
||||
<data name="btnEncoderConfig.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>94, 23</value>
|
||||
|
@ -2476,10 +2446,10 @@
|
|||
<value>tpScreenRecorder</value>
|
||||
</data>
|
||||
<data name=">>btnEncoderConfig.ZOrder" xml:space="preserve">
|
||||
<value>8</value>
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name="cboEncoder.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>232, 158</value>
|
||||
<value>232, 134</value>
|
||||
</data>
|
||||
<data name="cboEncoder.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>224, 21</value>
|
||||
|
@ -2497,7 +2467,7 @@
|
|||
<value>tpScreenRecorder</value>
|
||||
</data>
|
||||
<data name=">>cboEncoder.ZOrder" xml:space="preserve">
|
||||
<value>9</value>
|
||||
<value>8</value>
|
||||
</data>
|
||||
<data name="nudScreenRecorderDuration.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>232, 86</value>
|
||||
|
@ -2521,7 +2491,7 @@
|
|||
<value>tpScreenRecorder</value>
|
||||
</data>
|
||||
<data name=">>nudScreenRecorderDuration.ZOrder" xml:space="preserve">
|
||||
<value>10</value>
|
||||
<value>9</value>
|
||||
</data>
|
||||
<data name="nudScreenRecorderStartDelay.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>232, 110</value>
|
||||
|
@ -2545,7 +2515,7 @@
|
|||
<value>tpScreenRecorder</value>
|
||||
</data>
|
||||
<data name=">>nudScreenRecorderStartDelay.ZOrder" xml:space="preserve">
|
||||
<value>11</value>
|
||||
<value>10</value>
|
||||
</data>
|
||||
<data name="cbScreenRecorderFixedDuration.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
|
@ -2575,7 +2545,7 @@
|
|||
<value>tpScreenRecorder</value>
|
||||
</data>
|
||||
<data name=">>cbScreenRecorderFixedDuration.ZOrder" xml:space="preserve">
|
||||
<value>12</value>
|
||||
<value>11</value>
|
||||
</data>
|
||||
<data name="nudGIFFPS.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>232, 60</value>
|
||||
|
@ -2599,7 +2569,7 @@
|
|||
<value>tpScreenRecorder</value>
|
||||
</data>
|
||||
<data name=">>nudGIFFPS.ZOrder" xml:space="preserve">
|
||||
<value>13</value>
|
||||
<value>12</value>
|
||||
</data>
|
||||
<data name="lblGIFFPS.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
|
@ -2629,7 +2599,7 @@
|
|||
<value>tpScreenRecorder</value>
|
||||
</data>
|
||||
<data name=">>lblGIFFPS.ZOrder" xml:space="preserve">
|
||||
<value>14</value>
|
||||
<value>13</value>
|
||||
</data>
|
||||
<data name="tpScreenRecorder.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>4, 22</value>
|
||||
|
|
|
@ -273,9 +273,6 @@
|
|||
<data name="tpRectangleAnnotate.Text" xml:space="preserve">
|
||||
<value>Dikdörtgen dipnot</value>
|
||||
</data>
|
||||
<data name="cbScreenRecordAutoDisableAero.Text" xml:space="preserve">
|
||||
<value>Kaydetme sırasında Windows Aero otomatik kapatılsın (Aero kaydetme performansını düşürür)</value>
|
||||
</data>
|
||||
<data name="lblScreenRecorderFixedDuration.Text" xml:space="preserve">
|
||||
<value>saniye</value>
|
||||
</data>
|
||||
|
|
|
@ -195,9 +195,6 @@
|
|||
<data name="cbPlaySoundAfterUpload.Text" xml:space="preserve">
|
||||
<value>上传后声音提示</value>
|
||||
</data>
|
||||
<data name="cbScreenRecordAutoDisableAero.Text" xml:space="preserve">
|
||||
<value>截图时自动禁用Windows Aero功能(降低Aero对截图的影响)</value>
|
||||
</data>
|
||||
<data name="cbScreenRecorderFixedDuration.Text" xml:space="preserve">
|
||||
<value>固定时间:</value>
|
||||
</data>
|
||||
|
|
|
@ -295,15 +295,14 @@ public class TaskSettingsCapture
|
|||
#region Capture / Screen recorder
|
||||
|
||||
public FFmpegOptions FFmpegOptions = new FFmpegOptions();
|
||||
public bool RunScreencastCLI = false;
|
||||
public int VideoEncoderSelected = 0;
|
||||
public int ScreenRecordFPS = 20;
|
||||
public int GIFFPS = 5;
|
||||
public bool ScreenRecordFixedDuration = false;
|
||||
public float ScreenRecordDuration = 3f;
|
||||
public bool ScreenRecordAutoStart = true;
|
||||
public float ScreenRecordStartDelay = 0.5f;
|
||||
public bool ScreenRecordAutoDisableAero = false;
|
||||
public bool RunScreencastCLI = false;
|
||||
public int VideoEncoderSelected = 0;
|
||||
|
||||
#endregion Capture / Screen recorder
|
||||
|
||||
|
|
Loading…
Reference in a new issue