mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-06-23 16:38:46 +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);
|
TEXTURE = SDL_CreateTexture(RENDERER, SDL_PIXELFORMAT_RGB565, SDL_TEXTUREACCESS_STREAMING, DISPLAY_RESX, DISPLAY_RESY);
|
||||||
SDL_SetTextureBlendMode(TEXTURE, SDL_BLENDMODE_BLEND);
|
SDL_SetTextureBlendMode(TEXTURE, SDL_BLENDMODE_BLEND);
|
||||||
// TODO: find better way how to embed/distribute background image
|
// 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) {
|
if (BACKGROUND) {
|
||||||
SDL_SetTextureBlendMode(BACKGROUND, SDL_BLENDMODE_NONE);
|
SDL_SetTextureBlendMode(BACKGROUND, SDL_BLENDMODE_NONE);
|
||||||
sdl_touch_offset_x = DISPLAY_TOUCH_OFFSET_X;
|
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);
|
display_printf("func: %s\n", func);
|
||||||
}
|
}
|
||||||
#ifdef GITREV
|
#ifdef GITREV
|
||||||
#define XSTR(s) STR(s)
|
|
||||||
#define STR(s) #s
|
|
||||||
display_printf("rev : %s\n", XSTR(GITREV));
|
display_printf("rev : %s\n", XSTR(GITREV));
|
||||||
#endif
|
#endif
|
||||||
shutdown();
|
shutdown();
|
||||||
|
@ -23,6 +23,9 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "secbool.h"
|
#include "secbool.h"
|
||||||
|
|
||||||
|
#define XSTR(s) STR(s)
|
||||||
|
#define STR(s) #s
|
||||||
|
|
||||||
#ifndef MIN
|
#ifndef MIN
|
||||||
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
|
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
|
||||||
#endif
|
#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);
|
printf("func: %s\n", func);
|
||||||
}
|
}
|
||||||
#ifdef GITREV
|
#ifdef GITREV
|
||||||
#define XSTR(s) STR(s)
|
|
||||||
#define STR(s) #s
|
|
||||||
display_printf("rev : %s\n", XSTR(GITREV));
|
display_printf("rev : %s\n", XSTR(GITREV));
|
||||||
printf("rev : %s\n", XSTR(GITREV));
|
printf("rev : %s\n", XSTR(GITREV));
|
||||||
#endif
|
#endif
|
||||||
|
@ -23,6 +23,9 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "secbool.h"
|
#include "secbool.h"
|
||||||
|
|
||||||
|
#define XSTR(s) STR(s)
|
||||||
|
#define STR(s) #s
|
||||||
|
|
||||||
#ifndef MIN
|
#ifndef MIN
|
||||||
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
|
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user