Make Aero warning more annoying when using monitor capture.
Allow disabling of Aero at runtime.
This commit is contained in:
parent
f638287e44
commit
08e1ac51ef
@ -1928,6 +1928,15 @@ INT_PTR CALLBACK ConfigDesktopSourceProc(HWND hwnd, UINT message, WPARAM wParam,
|
||||
|
||||
int gamma = (int)SendMessage(GetDlgItem(hwnd, IDC_GAMMA), TBM_GETPOS, 0, 0);
|
||||
data->SetInt(TEXT("gamma"), gamma);
|
||||
|
||||
if (OSGetVersion() < 8)
|
||||
{
|
||||
BOOL bComposition;
|
||||
DwmIsCompositionEnabled(&bComposition);
|
||||
|
||||
if (bComposition)
|
||||
MessageBox (hwnd, Str("Sources.SoftwareCaptureSource.WarningAero"), TEXT("Warning"), MB_ICONEXCLAMATION);
|
||||
}
|
||||
}
|
||||
|
||||
case IDCANCEL:
|
||||
|
@ -49,9 +49,6 @@ void TerminateSockets();
|
||||
|
||||
void LogVideoCardStats();
|
||||
|
||||
BOOL bCompositionEnabled = TRUE;
|
||||
BOOL bDisableComposition = FALSE;
|
||||
|
||||
HANDLE hOBSMutex = NULL;
|
||||
|
||||
BOOL LoadSeDebugPrivilege()
|
||||
@ -581,14 +578,10 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
|
||||
|
||||
//--------------------------------------------
|
||||
|
||||
bDisableComposition = AppConfig->GetInt(TEXT("Video"), TEXT("DisableAero"), 0);
|
||||
BOOL bDisableComposition = AppConfig->GetInt(TEXT("Video"), TEXT("DisableAero"), 0);
|
||||
|
||||
DwmIsCompositionEnabled(&bCompositionEnabled);
|
||||
if(bDisableComposition)
|
||||
{
|
||||
if(bCompositionEnabled)
|
||||
DwmEnableComposition(DWM_EC_DISABLECOMPOSITION);
|
||||
}
|
||||
|
||||
//--------------------------------------------
|
||||
|
||||
@ -615,7 +608,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
|
||||
delete AppConfig;
|
||||
delete GlobalConfig;
|
||||
|
||||
if(bDisableComposition && bCompositionEnabled)
|
||||
if(bDisableComposition)
|
||||
DwmEnableComposition(DWM_EC_ENABLECOMPOSITION);
|
||||
|
||||
TerminateSockets();
|
||||
|
@ -18,6 +18,7 @@
|
||||
********************************************************************************/
|
||||
|
||||
#include "Settings.h"
|
||||
#include <Dwmapi.h>
|
||||
|
||||
//============================================================================
|
||||
// Helpers
|
||||
@ -208,6 +209,11 @@ void SettingsVideo::ApplySettings()
|
||||
|
||||
if(!App->bRunning)
|
||||
App->ResizeWindow(false);
|
||||
|
||||
if (bDisableAero)
|
||||
DwmEnableComposition(DWM_EC_DISABLECOMPOSITION);
|
||||
else
|
||||
DwmEnableComposition(DWM_EC_ENABLECOMPOSITION);
|
||||
}
|
||||
|
||||
void SettingsVideo::CancelSettings()
|
||||
|
@ -206,8 +206,8 @@ Settings.Publish.Mode.LiveStream "Live Stream"
|
||||
|
||||
Settings.Video.Custom "Custom:"
|
||||
Settings.Video.Device "Video Adapter:"
|
||||
Settings.Video.DisableAero "Disable Aero at startup:"
|
||||
Settings.Video.DisableAeroTooltip "Disabling Aero is recommended if using software monitor capture"
|
||||
Settings.Video.DisableAero "Disable Aero:"
|
||||
Settings.Video.DisableAeroTooltip "Disabling Aero is strongly recommended if using monitor capture."
|
||||
Settings.Video.Downscale "Resolution Downscale:"
|
||||
Settings.Video.DownscaleTooltip "Downscale can improve video quality at the cost of resolution."
|
||||
Settings.Video.Filter "Filter:"
|
||||
@ -265,7 +265,7 @@ Sources.SoftwareCaptureSource.Size "Size:"
|
||||
Sources.SoftwareCaptureSource.SpillReduction "Spill Reduction:"
|
||||
Sources.SoftwareCaptureSource.UseColorKey "Use Color Key:"
|
||||
Sources.SoftwareCaptureSource.Warning "***Warning*** On Windows 7 / Vista, unless you absolutely need to capture your whole desktop, use window capture or game capture instead, as they perform much more efficiently."
|
||||
Sources.SoftwareCaptureSource.WarningAero "***Warning*** Aero is enabled! On Windows 7 / Vista, it's recommended to disable it when using monitor capture or you will have low FPS. Go to video settings, disable aero, and restart OBS."
|
||||
Sources.SoftwareCaptureSource.WarningAero "***Warning*** Aero is enabled! On Windows 7 / Vista, it's recommended to disable Aero when using monitor capture or you will have low FPS. Go to Video Settings and disable Aero to avoid this problem."
|
||||
Sources.SoftwareCaptureSource.Window "Window:"
|
||||
Sources.SoftwareCaptureSource.WindowCapture "Window Capture"
|
||||
Sources.SoftwareCaptureSource.WindowCaptureTooltip "Aero can be enabled if using only window capture. The image cannot update while minimized. Capturing is typically much faster with this method than monitor capture. When aero is enabled, windows on top will not appear."
|
||||
|
Loading…
x
Reference in New Issue
Block a user