diff --git a/Source/DesktopImageSource.cpp b/Source/DesktopImageSource.cpp index 62626ce5..73a6044d 100644 --- a/Source/DesktopImageSource.cpp +++ b/Source/DesktopImageSource.cpp @@ -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: diff --git a/Source/Main.cpp b/Source/Main.cpp index 5687cf19..ac36a1c4 100644 --- a/Source/Main.cpp +++ b/Source/Main.cpp @@ -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); - } + 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(); diff --git a/Source/SettingsVideo.cpp b/Source/SettingsVideo.cpp index 73c43571..385a6d9c 100644 --- a/Source/SettingsVideo.cpp +++ b/Source/SettingsVideo.cpp @@ -18,6 +18,7 @@ ********************************************************************************/ #include "Settings.h" +#include //============================================================================ // 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() diff --git a/rundir/locale/en.txt b/rundir/locale/en.txt index 1208d01c..09e53f88 100644 --- a/rundir/locale/en.txt +++ b/rundir/locale/en.txt @@ -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."