Continue on icon loading failure
If loading the icon from xpm fails, launch scrcpy without window icon. <https://github.com/Genymobile/scrcpy/issues/539>
This commit is contained in:
parent
2dc1a59471
commit
3133d5d1c7
1 changed files with 5 additions and 6 deletions
|
@ -177,13 +177,12 @@ screen_init_rendering(struct screen *screen, const char *device_name,
|
|||
}
|
||||
|
||||
SDL_Surface *icon = read_xpm(icon_xpm);
|
||||
if (!icon) {
|
||||
LOGE("Could not load icon: %s", SDL_GetError());
|
||||
screen_destroy(screen);
|
||||
return false;
|
||||
}
|
||||
if (icon) {
|
||||
SDL_SetWindowIcon(screen->window, icon);
|
||||
SDL_FreeSurface(icon);
|
||||
} else {
|
||||
LOGW("Could not load icon");
|
||||
}
|
||||
|
||||
LOGI("Initial texture: %" PRIu16 "x%" PRIu16, frame_size.width,
|
||||
frame_size.height);
|
||||
|
|
Loading…
Reference in a new issue