Use a new scrcpy icon

Use the new icon designed by @varlesh:
<https://github.com/Genymobile/scrcpy/pull/1987#issuecomment-949684080>

Load it from a PNG file (SDL only supports bitmap icons).
This commit is contained in:
Romain Vimont
2021-10-22 18:51:20 +02:00
parent 12ed2f2402
commit 6004f0b6b0
5 changed files with 11 additions and 5 deletions

View File

@@ -5,9 +5,8 @@
#include <SDL2/SDL.h>
#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");
}