summaryrefslogtreecommitdiff
path: root/atari/plot/font_vdi.c
diff options
context:
space:
mode:
authorOle Loots <ole@monochrom.net>2011-03-07 22:56:11 +0000
committerOle Loots <ole@monochrom.net>2011-03-07 22:56:11 +0000
commitbf3dc29e04f24dc449a7414ad3fd8aebeeb37ae0 (patch)
tree0719ff3232ef951bcc723ea179f3359f14bd28f9 /atari/plot/font_vdi.c
parent721b73bc557e8e400ed5b02f23531064650ec105 (diff)
downloadnetsurf-bf3dc29e04f24dc449a7414ad3fd8aebeeb37ae0.tar.gz
netsurf-bf3dc29e04f24dc449a7414ad3fd8aebeeb37ae0.tar.bz2
Added missing call to vst_color
svn path=/trunk/netsurf/; revision=11933
Diffstat (limited to 'atari/plot/font_vdi.c')
-rwxr-xr-xatari/plot/font_vdi.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/atari/plot/font_vdi.c b/atari/plot/font_vdi.c
index baaed2741..a2c7a3573 100755
--- a/atari/plot/font_vdi.c
+++ b/atari/plot/font_vdi.c
@@ -171,6 +171,21 @@ static int pixel_pos( FONT_PLOTTER self, const plot_font_style_t * fstyle,const
return( 0 );
}
+static inline void vst_rgbcolor( short vdih, uint32_t cin )
+{
+ if( vdi_sysinfo.scr_bpp > 8 ) {
+ unsigned short c[4];
+ rgb_to_vdi1000( (unsigned char*)&cin, (unsigned short*)&c );
+ vs_color( vdih, OFFSET_CUSTOM_COLOR, (unsigned short*)&c[0] );
+ vst_color( vdih, OFFSET_CUSTOM_COLOR );
+ } else {
+ if( vdi_sysinfo.scr_bpp >= 4 )
+ vst_color( vdih, RGB_TO_VDI(cin) );
+ else
+ vst_color( vdih, BLACK );
+ }
+}
+
static int text( FONT_PLOTTER self, int x, int y, const char *text, size_t length,
const plot_font_style_t *fstyle )
{
@@ -205,11 +220,7 @@ static int text( FONT_PLOTTER self, int x, int y, const char *text, size_t leng
vst_alignment(vdih, 0, 4, &cw, &ch );
vst_height( self->vdi_handle, pxsize, &cw, &ch, &cellw, &cellh);
vswr_mode( self->vdi_handle, MD_TRANS );
- if( vdi_sysinfo.scr_bpp >= 4 ){
- vst_color( self->vdi_handle, RGB_TO_VDI(fstyle->foreground) );
- } else {
- vst_color( self->vdi_handle, BLACK );
- }
+ vst_rgbcolor(self->vdi_handle, fstyle->foreground );
if( atari_sysinfo.gdos_FSMC ){
v_ftext( self->vdi_handle, x, y, (char*)&textcpy );