(1) Find out the position of the current video device, information on this may be found in the registry, here:
\\HKLM\HARDWARE\DEVICEMAP\VIDEO\Device\Video0
There you will find a LPSTR type of entry, pointing to a registry key for the current video device, e.g.
"\Registry\Machine\System\ControlSet001\Services\G400\Device0"
(2) Parse that string, replacing "\Registry\Machine" with HKLM (HKEY_LOCAL_MACHINE) and open the corresponding registry key,
(3) Look for a DWORD value "Acceleration.Level". If the value does not exists, hardware acceleration is set to "Full". Otherwise, "Acceleration.Level" may be one of 0x1 to 0x5, 0x5 meaning "No Acceleration", and 0x1 meaning "All but cursor acceleration" (see "Extended Display Settings").
(4) Set the desired acceleration level, or delete the entry to set "Full" acceleration mode.
(5) Let Windows reload the display settings by using the following code:
DEVMODE devMode;
BOOL success = ::EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &devMode);
if (success == TRUE)
{
LONG result = ::ChangeDisplaySettings(&devMode, CDS_RESET);
printf("ChangeDisplaySettings() returned: %d\n", result);
}
First, the current display settings are loaded into the devMode variable, and then, the displayed is forced to perform a reset; at this occasion, the "Acceleration.Level" value is read out from the registry and the new acceleration level is set.