Skip to content

Commit

Permalink
Attempt to increase Gamma correction range for dimmer function on Vis…
Browse files Browse the repository at this point in the history
…ta/Win7
  • Loading branch information
David Register committed Apr 16, 2012
1 parent cdf1bac commit 8172e51
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/chcanv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16432,6 +16432,13 @@ int InitScreenBrightness(void)
ReleaseDC(NULL, hDC); // Release the DC
}

// On Windows hosts, try to adjust the registry to allow full range setting of Gamma table
// This is an undocumented Windows hack.....
wxRegKey *pRegKey = new wxRegKey(_T("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ICM"));
if( !pRegKey->Exists() )
pRegKey->Create();
pRegKey->SetValue(_T("GdiIcmGammaRange"),256);

g_brightness_init = true;
return 1;
}
Expand Down

0 comments on commit 8172e51

Please sign in to comment.