diff options
Diffstat (limited to 'devices/gdevdsp.c')
-rw-r--r-- | devices/gdevdsp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/devices/gdevdsp.c b/devices/gdevdsp.c index 754577af0..878220c86 100644 --- a/devices/gdevdsp.c +++ b/devices/gdevdsp.c @@ -600,7 +600,7 @@ display_map_rgb_color_rgb(gx_device * dev, const gx_color_value cv[]) return gx_default_rgb_map_rgb_color(dev, rgb); /* RGB */ } else - return (blue<<16) + (green<<8) + red; /* BGR */ + return ((gx_color_index)blue<<16) + (green<<8) + red; /* BGR */ case DISPLAY_ALPHA_FIRST: case DISPLAY_UNUSED_FIRST: if ((ddev->nFormat & DISPLAY_ENDIAN_MASK) == DISPLAY_BIGENDIAN) @@ -610,9 +610,9 @@ display_map_rgb_color_rgb(gx_device * dev, const gx_color_value cv[]) case DISPLAY_ALPHA_LAST: case DISPLAY_UNUSED_LAST: if ((ddev->nFormat & DISPLAY_ENDIAN_MASK) == DISPLAY_BIGENDIAN) - return ((gx_color_index)red<<24) + (green<<16) + (blue<<8); /* RGBx */ + return ((gx_color_index)red<<24) + ((gx_color_index)green<<16) + (blue<<8); /* RGBx */ else - return ((gx_color_index)blue<<24) + (green<<16) + (red<<8); /* BGRx */ + return ((gx_color_index)blue<<24) + ((gx_color_index)green<<16) + (red<<8); /* BGRx */ } return 0; } |