mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-07-07 15:18:08 +00:00
TR-core/unix: define gamma correction things only for TT, TR does not use it
This commit is contained in:
parent
165d11bb9d
commit
1503410297
@ -165,7 +165,9 @@ uint32_t hal_ticks_ms() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int SDLCALL emulator_event_filter(void *userdata, SDL_Event *event) {
|
static int SDLCALL emulator_event_filter(void *userdata, SDL_Event *event) {
|
||||||
|
#if defined TREZOR_MODEL_T
|
||||||
float gamma = display_gamma(0);
|
float gamma = display_gamma(0);
|
||||||
|
#endif
|
||||||
switch (event->type) {
|
switch (event->type) {
|
||||||
case SDL_QUIT:
|
case SDL_QUIT:
|
||||||
trezor_shutdown();
|
trezor_shutdown();
|
||||||
|
@ -121,6 +121,7 @@ static void prepare_gamma_lut(float gamma) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined TREZOR_MODEL_T
|
||||||
static void gamma_correct_buffer_to_display(void) {
|
static void gamma_correct_buffer_to_display(void) {
|
||||||
// Gamma correct all the pixels in BUFFER_TO_DISPLAY.
|
// Gamma correct all the pixels in BUFFER_TO_DISPLAY.
|
||||||
pixel_color *pixels = (pixel_color *)BUFFER_TO_DISPLAY->pixels;
|
pixel_color *pixels = (pixel_color *)BUFFER_TO_DISPLAY->pixels;
|
||||||
@ -131,6 +132,7 @@ static void gamma_correct_buffer_to_display(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
float display_gamma(float gamma) {
|
float display_gamma(float gamma) {
|
||||||
float prev_gamma = DISPLAY_GAMMA;
|
float prev_gamma = DISPLAY_GAMMA;
|
||||||
|
Loading…
Reference in New Issue
Block a user