pixel contrast in mono

This commit is contained in:
Gwenhael Le Moine 2024-06-13 16:54:59 +02:00
parent 14fd31d13c
commit c72a393498
No known key found for this signature in database
GPG key ID: FDFE3669426707A7

View file

@ -158,13 +158,14 @@ static void colors_setup( void )
b = COLORS[ i ].b;
}
if ( !config.mono && i == PIXEL ) {
r = ( 0x13 - contrast ) * ( COLORS[ LCD ].r / 0x10 );
g = ( 0x13 - contrast ) * ( COLORS[ LCD ].g / 0x10 );
b = 128 - ( ( 0x13 - contrast ) * ( ( 128 - COLORS[ LCD ].b ) / 0x10 ) );
}
ARGBColors[ i ] = 0xff000000 | ( r << 16 ) | ( g << 8 ) | b;
}
r = ( 0x13 - contrast ) * ( COLORS[ LCD ].r / 0x10 );
g = ( 0x13 - contrast ) * ( COLORS[ LCD ].g / 0x10 );
b = 128 - ( ( 0x13 - contrast ) * ( ( 128 - COLORS[ LCD ].b ) / 0x10 ) );
ARGBColors[ PIXEL ] = 0xff000000 | ( r << 16 ) | ( g << 8 ) | b;
}
// This should be called once to setup the surfaces. Calling it multiple