From 9f115b564efe7c3ed85cec622c05f3f60c2bc653 Mon Sep 17 00:00:00 2001 From: Ryan VanderMeulen Date: Fri, 10 Mar 2017 11:43:33 -0500 Subject: [PATCH] Backed out changeset cf2b0421dd57 (bug 1345222) for suspicion of causing bug 1346215. --- gfx/thebes/gfxWindowsPlatform.cpp | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/gfx/thebes/gfxWindowsPlatform.cpp b/gfx/thebes/gfxWindowsPlatform.cpp index b6dd4a65215c..860245a8d08f 100755 --- a/gfx/thebes/gfxWindowsPlatform.cpp +++ b/gfx/thebes/gfxWindowsPlatform.cpp @@ -1133,10 +1133,8 @@ gfxWindowsPlatform::FontsPrefsChanged(const char *aPref) } } -#define DISPLAY1_REGISTRY_KEY \ - HKEY_CURRENT_USER, "Software\\Microsoft\\Avalon.Graphics\\DISPLAY1" - -#define ENHANCED_CONTRAST_VALUE_NAME "EnhancedContrastLevel" +#define ENHANCED_CONTRAST_REGISTRY_KEY \ + HKEY_CURRENT_USER, "Software\\Microsoft\\Avalon.Graphics\\DISPLAY1\\EnhancedContrastLevel" void gfxWindowsPlatform::SetupClearTypeParams() @@ -1203,14 +1201,10 @@ gfxWindowsPlatform::SetupClearTypeParams() contrast = contrast; } else { HKEY hKey; - LONG res = RegOpenKeyExA(DISPLAY1_REGISTRY_KEY, - 0, KEY_READ, &hKey); - if (res == ERROR_SUCCESS) { - res = RegQueryValueExA(hKey, ENHANCED_CONTRAST_VALUE_NAME, - nullptr, nullptr, nullptr, nullptr); - if (res == ERROR_SUCCESS) { - contrast = defaultRenderingParams->GetEnhancedContrast(); - } + if (RegOpenKeyExA(ENHANCED_CONTRAST_REGISTRY_KEY, + 0, KEY_READ, &hKey) == ERROR_SUCCESS) + { + contrast = defaultRenderingParams->GetEnhancedContrast(); RegCloseKey(hKey); } else { contrast = 1.0;