Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support wallpaper #424

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
emulator support wallpaper
ligenxxxx committed Jun 20, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit fc59a5c471d28e4bd8650ca0398ec1e6fad00d16
3 changes: 1 addition & 2 deletions src/core/main.c
Original file line number Diff line number Diff line change
@@ -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);
}
6 changes: 6 additions & 0 deletions src/core/osd.h
Original file line number Diff line number Diff line change
@@ -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,