mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-22 22:38:08 +00:00
extmod/modtrezorui: prepare display UI for model change
This commit is contained in:
parent
02c5f14728
commit
f23f751ab0
@ -91,7 +91,7 @@ void display_init(void)
|
||||
TEXTURE = SDL_CreateTexture(RENDERER, SDL_PIXELFORMAT_RGB565, SDL_TEXTUREACCESS_STREAMING, DISPLAY_RESX, DISPLAY_RESY);
|
||||
SDL_SetTextureBlendMode(TEXTURE, SDL_BLENDMODE_BLEND);
|
||||
// TODO: find better way how to embed/distribute background image
|
||||
BACKGROUND = IMG_LoadTexture(RENDERER, "../embed/unix/background.jpg");
|
||||
BACKGROUND = IMG_LoadTexture(RENDERER, "../embed/unix/background_" XSTR(TREZOR_MODEL) ".jpg");
|
||||
if (BACKGROUND) {
|
||||
SDL_SetTextureBlendMode(BACKGROUND, SDL_BLENDMODE_NONE);
|
||||
sdl_touch_offset_x = DISPLAY_TOUCH_OFFSET_X;
|
||||
|
@ -45,8 +45,6 @@ void __attribute__((noreturn)) __fatal_error(const char *expr, const char *msg,
|
||||
display_printf("func: %s\n", func);
|
||||
}
|
||||
#ifdef GITREV
|
||||
#define XSTR(s) STR(s)
|
||||
#define STR(s) #s
|
||||
display_printf("rev : %s\n", XSTR(GITREV));
|
||||
#endif
|
||||
shutdown();
|
||||
|
@ -23,6 +23,9 @@
|
||||
#include <stdint.h>
|
||||
#include "secbool.h"
|
||||
|
||||
#define XSTR(s) STR(s)
|
||||
#define STR(s) #s
|
||||
|
||||
#ifndef MIN
|
||||
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
|
||||
#endif
|
||||
|
Before Width: | Height: | Size: 88 KiB After Width: | Height: | Size: 88 KiB |
@ -56,8 +56,6 @@ void __attribute__((noreturn)) __fatal_error(const char *expr, const char *msg,
|
||||
printf("func: %s\n", func);
|
||||
}
|
||||
#ifdef GITREV
|
||||
#define XSTR(s) STR(s)
|
||||
#define STR(s) #s
|
||||
display_printf("rev : %s\n", XSTR(GITREV));
|
||||
printf("rev : %s\n", XSTR(GITREV));
|
||||
#endif
|
||||
|
@ -23,6 +23,9 @@
|
||||
#include <stdint.h>
|
||||
#include "secbool.h"
|
||||
|
||||
#define XSTR(s) STR(s)
|
||||
#define STR(s) #s
|
||||
|
||||
#ifndef MIN
|
||||
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user