From 6004f0b6b069ef8c97e00a7b6f240413e24b28d7 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Fri, 22 Oct 2021 18:51:20 +0200 Subject: [PATCH] Use a new scrcpy icon Use the new icon designed by @varlesh: Load it from a PNG file (SDL only supports bitmap icons). --- app/meson.build | 3 +++ app/src/screen.c | 7 +++---- data/icon.png | Bin 0 -> 6530 bytes release.mk | 2 ++ run | 4 +++- 5 files changed, 11 insertions(+), 5 deletions(-) create mode 100644 data/icon.png diff --git a/app/meson.build b/app/meson.build index 698120a5..b842bd04 100644 --- a/app/meson.build +++ b/app/meson.build @@ -151,6 +151,9 @@ executable('scrcpy', src, c_args: []) install_man('scrcpy.1') +install_data('../data/icon.png', + rename: 'scrcpy.png', + install_dir: 'share/icons/hicolor/256x256/apps') ### TESTS diff --git a/app/src/screen.c b/app/src/screen.c index 3cd4329f..8a2748a9 100644 --- a/app/src/screen.c +++ b/app/src/screen.c @@ -5,9 +5,8 @@ #include #include "events.h" -#include "icon.xpm" +#include "icon.h" #include "scrcpy.h" -#include "tiny_xpm.h" #include "video_buffer.h" #include "util/log.h" @@ -405,10 +404,10 @@ screen_init(struct screen *screen, const struct screen_params *params) { LOGD("Trilinear filtering disabled (not an OpenGL renderer)"); } - SDL_Surface *icon = read_xpm(icon_xpm); + SDL_Surface *icon = scrcpy_icon_load(); if (icon) { SDL_SetWindowIcon(screen->window, icon); - SDL_FreeSurface(icon); + scrcpy_icon_destroy(icon); } else { LOGW("Could not load icon"); } diff --git a/data/icon.png b/data/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..b96a1aff9b842976bae652c6fc22af7daed8bbf2 GIT binary patch literal 6530 zcmc&(2Uk-~w?3hS7J9_cq`Wi{F$hwm7pay=5u_y)0YQ2PfgnvfqIBs<6_BEUfJ9md zD!q4*PNX+O$<2Ge`w#A2>#lXq%$z;5_RKo7XFq#C6ODMNMNi8?3jhGUj<$wA0DwqM z5I_wkRpuV0b^ySxqobi}=r{Ezo5lsnehGG?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