Skip to content

Commit

Permalink
emulator support wallpaper
Browse files Browse the repository at this point in the history
  • Loading branch information
ligenxxxx committed Jun 20, 2024
1 parent 655b0ae commit fc59a5c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 1 addition & 2 deletions src/core/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,7 @@ void lvgl_init() {
lv_disp_set_theme(dispp, theme);
lv_obj_set_style_bg_color(lv_scr_act(), lv_color_make(64, 64, 64), 0);

// user wallpaper
if (load_wallpaper("/mnt/extsd/resource/OSD/GOGGLE/wallpaper.bmp")) {
if (load_wallpaper(WALLPAPER_PATH)) {
lv_obj_t *img_obj = lv_img_create(lv_scr_act());
lv_img_set_src(img_obj, &img_menu_bg);
}
Expand Down
6 changes: 6 additions & 0 deletions src/core/osd.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ extern "C" {
#define OSD_BOUNDRY_0 0
#define OSD_BOUNDRY_1 6

#ifdef EMULATOR_BUILD
#define WALLPAPER_PATH "wallpaper.bmp"
#else
#define WALLPAPER_PATH "/mnt/extsd/resource/OSD/GOGGLE/wallpaper.bmp"
#endif

typedef enum {
OSD_RESOURCE_720 = 0,
OSD_RESOURCE_1080,
Expand Down

0 comments on commit fc59a5c

Please sign in to comment.