1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-14 03:30:02 +00:00

simulator border now reflects backlight value

This commit is contained in:
Pavol Rusnak 2016-05-18 00:49:39 +02:00
parent 171a7b3795
commit dbc57b16d4
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

View File

@ -90,7 +90,7 @@ void display_init(void)
SDL_DestroyWindow(win);
SDL_Quit();
}
SDL_SetRenderDrawColor(RENDERER, 48, 48, 48, 255);
SDL_SetRenderDrawColor(RENDERER, BACKLIGHT, BACKLIGHT, BACKLIGHT, 255);
SDL_RenderClear(RENDERER);
SCREEN = SDL_CreateRGBSurface(0, RESX, RESY, 16, 0xF800, 0x07E0, 0x001F, 0x0000);
TEXTURE = SDL_CreateTexture(RENDERER, SDL_PIXELFORMAT_RGB565, SDL_TEXTUREACCESS_STREAMING, RESX, RESY);
@ -131,5 +131,6 @@ int display_backlight(int val)
if (val >= 0 && val <= 255) {
BACKLIGHT = val;
}
SDL_SetRenderDrawColor(RENDERER, BACKLIGHT, BACKLIGHT, BACKLIGHT, 255);
return BACKLIGHT;
}