1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-27 08:38:07 +00:00

core: embed background images into the emulator binary

This commit is contained in:
Pavol Rusnak 2019-05-04 22:32:03 +02:00
parent 87f14965c4
commit f27187e603
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
4 changed files with 6493 additions and 4 deletions

View File

@ -133,12 +133,21 @@ void display_init(void) {
SDL_PumpEvents();
SDL_SetWindowSize(win, WINDOW_WIDTH, WINDOW_HEIGHT);
#endif
// TODO: find better way how to embed/distribute background image
#ifdef TREZOR_EMULATOR_RASPI
BACKGROUND = IMG_LoadTexture(RENDERER, "embed/unix/background_raspi.jpg");
#include "background_raspi.h"
BACKGROUND = IMG_LoadTexture_RW(
RENDERER, SDL_RWFromMem(background_raspi_jpg, background_raspi_jpg_len),
0);
#else
BACKGROUND = IMG_LoadTexture(
RENDERER, "embed/unix/background_" XSTR(TREZOR_MODEL) ".jpg");
#if TREZOR_MODEL == T
#include "background_T.h"
BACKGROUND = IMG_LoadTexture_RW(
RENDERER, SDL_RWFromMem(background_T_jpg, background_T_jpg_len), 0);
#elif TREZOR_MODEL == 1
#include "background_1.h"
BACKGROUND = IMG_LoadTexture_RW(
RENDERER, SDL_RWFromMem(background_1_jpg, background_1_jpg_len), 0);
#endif
#endif
if (BACKGROUND) {
SDL_SetTextureBlendMode(BACKGROUND, SDL_BLENDMODE_NONE);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff