]> xenbits.xensource.com Git - seabios.git/commitdiff
vgabios: Fix stdvga_perform_gray_scale_summing().
authorKevin O'Connor <kevin@koconnor.net>
Sat, 9 Mar 2013 18:00:40 +0000 (13:00 -0500)
committerKevin O'Connor <kevin@koconnor.net>
Sat, 9 Mar 2013 18:00:40 +0000 (13:00 -0500)
Fix conversion error that resulted in
stdvga_perform_gray_scale_summing not actually writing the new results
back.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
vgasrc/stdvga.c

index a29d6d473e9f855683a6bbc07ffc3f010d627abc..1dd947e2e2261f55c3875c185dce3523822240d5 100644 (file)
@@ -123,6 +123,7 @@ stdvga_perform_gray_scale_summing(u16 start, u16 count)
         u16 intensity = ((77 * rgb[0] + 151 * rgb[1] + 28 * rgb[2]) + 0x80) >> 8;
         if (intensity > 0x3f)
             intensity = 0x3f;
+        rgb[0] = rgb[1] = rgb[2] = intensity;
 
         stdvga_dac_write(GET_SEG(SS), rgb, i, 1);
     }