[Title] change brightness level setting
authorhj79.son <hj79.son@samsung.com>
Sat, 26 Nov 2011 02:48:58 +0000 (11:48 +0900)
committerhj79.son <hj79.son@samsung.com>
Sat, 26 Nov 2011 02:48:58 +0000 (11:48 +0900)
[Type] Bugfix
[Module] Emulator / Display
[Priority] Minor
[CQ#]
[Redmine#] C API - 301
[Problem]
[Cause]
[Solution] subdividing brightness level from 10 to 24
[TestCase]

hw/brightness.c
hw/vga.c

index d1e5a9d..2e22674 100755 (executable)
@@ -27,7 +27,7 @@
 #define BRIGHTNESS_REG_SIZE                    256
 
 #define BRIGHTNESS_MIN                         (0)
-#define BRIGHTNESS_MAX                         (10)
+#define BRIGHTNESS_MAX                         (24)
 
 typedef struct BrightnessState {
     PCIDevice dev;
@@ -44,7 +44,7 @@ enum {
 };
 
 //uint8_t* brightness_ptr;     // pointer in qemu space
-uint32_t brightness_level = 10;
+uint32_t brightness_level = 24;
 
 //#define DEBUG_BRIGHTNESS
 
index f580858..1910d69 100755 (executable)
--- a/hw/vga.c
+++ b/hw/vga.c
@@ -1630,7 +1630,9 @@ extern uint16_t overlay1_height;
 extern uint8_t* overlay_ptr;   // pointer in qemu space
 
 /* brightness level :              0,   1,   2,   3,   4,   5,   6,   7,   8,   9 */
-static const uint8_t brightness_tbl[] = {20, 100, 120, 140, 160, 180, 200, 220, 230, 240};
+//static const uint8_t brightness_tbl[] = {20, 100, 120, 140, 160, 180, 200, 220, 230, 240};
+static const uint8_t brightness_tbl[] = {10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120,
+                                                                               130, 140, 150, 160, 170, 180, 190, 200, 210, 220, 230, 240};
 extern uint32_t brightness_level;
 #endif
 
@@ -1866,7 +1868,7 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
                 }
             }
             
-            if (brightness_level < 10) {
+            if (brightness_level < 24) {
                 dst_sub = s->ds->surface->data + addr;
                 dst = (uint32_t*)(s->ds->surface->data + addr);