File tree 1 file changed +7
-10
lines changed
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)
356
356
int G = Vclip ((A - 100 * U - (C >> 1 ) + 128 ) >> 8 );
357
357
int B = Vclip ((A + 516 * U + 128 ) >> 8 );
358
358
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 ;
360
362
if (use_scanlines == SCANLINES_50 )
361
363
{
362
364
// 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 ;
367
366
}
368
367
else if (use_scanlines == SCANLINES_BLACK )
369
368
{
@@ -379,14 +378,12 @@ static void video_write(bool update)
379
378
G = Vclip ((A - 100 * U - (C >> 1 ) + 128 ) >> 8 );
380
379
B = Vclip ((A + 516 * U + 128 ) >> 8 );
381
380
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 ;
383
383
if (use_scanlines == SCANLINES_50 )
384
384
{
385
385
// 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 ;
390
387
}
391
388
else if (use_scanlines == SCANLINES_BLACK )
392
389
{
You can’t perform that action at this time.
0 commit comments