1
0
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:
Pavol Rusnak 2018-09-11 15:59:05 +02:00
parent 02c5f14728
commit f23f751ab0
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
6 changed files with 7 additions and 5 deletions

View File

@ -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;

View File

@ -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();

View File

@ -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

View File

Before

Width:  |  Height:  |  Size: 88 KiB

After

Width:  |  Height:  |  Size: 88 KiB

View File

@ -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

View File

@ -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