mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 15:38:11 +00:00
core: embed background images into the emulator binary
This commit is contained in:
parent
87f14965c4
commit
f27187e603
@ -133,12 +133,21 @@ void display_init(void) {
|
|||||||
SDL_PumpEvents();
|
SDL_PumpEvents();
|
||||||
SDL_SetWindowSize(win, WINDOW_WIDTH, WINDOW_HEIGHT);
|
SDL_SetWindowSize(win, WINDOW_WIDTH, WINDOW_HEIGHT);
|
||||||
#endif
|
#endif
|
||||||
// TODO: find better way how to embed/distribute background image
|
|
||||||
#ifdef TREZOR_EMULATOR_RASPI
|
#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
|
#else
|
||||||
BACKGROUND = IMG_LoadTexture(
|
#if TREZOR_MODEL == T
|
||||||
RENDERER, "embed/unix/background_" XSTR(TREZOR_MODEL) ".jpg");
|
#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
|
#endif
|
||||||
if (BACKGROUND) {
|
if (BACKGROUND) {
|
||||||
SDL_SetTextureBlendMode(BACKGROUND, SDL_BLENDMODE_NONE);
|
SDL_SetTextureBlendMode(BACKGROUND, SDL_BLENDMODE_NONE);
|
||||||
|
1139
core/embed/unix/background_1.h
Normal file
1139
core/embed/unix/background_1.h
Normal file
File diff suppressed because it is too large
Load Diff
3063
core/embed/unix/background_T.h
Normal file
3063
core/embed/unix/background_T.h
Normal file
File diff suppressed because it is too large
Load Diff
2278
core/embed/unix/background_raspi.h
Normal file
2278
core/embed/unix/background_raspi.h
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user