File tree Expand file tree Collapse file tree 1 file changed +7
-10
lines changed
Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -356,14 +356,13 @@ static void video_write(bool update)
356356 int G = Vclip ((A - 100 * U - (C >> 1 ) + 128 ) >> 8 );
357357 int B = Vclip ((A + 516 * U + 128 ) >> 8 );
358358
359- RGBAframe [rgb_offset ] = (B << 16 ) | (G << 8 ) | (R << 0 ) | (0xFF << 24 );
359+ uint32_t rgba = (B << 16 ) | (G << 8 ) | (R << 0 ) | (0xFF << 24 );
360+
361+ RGBAframe [rgb_offset ] = rgba ;
360362 if (use_scanlines == SCANLINES_50 )
361363 {
362364 // halve the rgb values for a dimmed scanline
363- R /= 2 ;
364- G /= 2 ;
365- B /= 2 ;
366- RGBAframe [rgb_offset + video_width ] = (B << 16 ) | (G << 8 ) | (R << 0 ) | (0xff << 24 );
365+ RGBAframe [rgb_offset + video_width ] = (rgba >> 1 & 0x007f7f7f ) | 0xff000000 ;
367366 }
368367 else if (use_scanlines == SCANLINES_BLACK )
369368 {
@@ -379,14 +378,12 @@ static void video_write(bool update)
379378 G = Vclip ((A - 100 * U - (C >> 1 ) + 128 ) >> 8 );
380379 B = Vclip ((A + 516 * U + 128 ) >> 8 );
381380
382- RGBAframe [rgb_offset ] = (B << 16 ) | (G << 8 ) | (R << 0 ) | (0xFF << 24 );
381+ rgba = (B << 16 ) | (G << 8 ) | (R << 0 ) | (0xFF << 24 );
382+ RGBAframe [rgb_offset ] = rgba ;
383383 if (use_scanlines == SCANLINES_50 )
384384 {
385385 // halve the rgb values for a dimmed scanline
386- R /= 2 ;
387- G /= 2 ;
388- B /= 2 ;
389- RGBAframe [rgb_offset + video_width ] = (B << 16 ) | (G << 8 ) | (R << 0 ) | (0xff << 24 );
386+ RGBAframe [rgb_offset + video_width ] = (rgba >> 1 & 0x007f7f7f ) | 0xff000000 ;
390387 }
391388 else if (use_scanlines == SCANLINES_BLACK )
392389 {
You can’t perform that action at this time.
0 commit comments