UI: Add option to disable aero on windows vista/7

On windows vista/7, you cannot really use display capture efficiently
without disabling aero, so this will add an option to settings to allow
it to be disabled and cause it to be disabled on startup.
This commit is contained in:
jp9000
2015-05-25 01:37:13 -07:00
parent 0c631db046
commit e7eaa268e5
4 changed files with 76 additions and 3 deletions

View File

@@ -683,6 +683,15 @@ void OBSBasic::OBSInit()
if (!previewEnabled)
QMetaObject::invokeMethod(this, "TogglePreview",
Qt::QueuedConnection);
#ifdef _WIN32
uint32_t winVer = GetWindowsVersion();
if (winVer > 0 && winVer < 0x602) {
bool disableAero = config_get_bool(basicConfig, "Video",
"DisableAero");
SetAeroEnabled(!disableAero);
}
#endif
}
void OBSBasic::InitHotkeys()
@@ -888,6 +897,17 @@ OBSBasic::~OBSBasic()
config_set_bool(App()->GlobalConfig(), "BasicWindow", "PreviewEnabled",
previewEnabled);
config_save(App()->GlobalConfig());
#ifdef _WIN32
uint32_t winVer = GetWindowsVersion();
if (winVer > 0 && winVer < 0x602) {
bool disableAero = config_get_bool(basicConfig, "Video",
"DisableAero");
if (disableAero) {
SetAeroEnabled(true);
}
}
#endif
}
void OBSBasic::SaveProject()