diff options
author | Michael S. Tsirkin | 2011-05-05 15:39:47 +0200 |
---|---|---|
committer | Michael S. Tsirkin | 2011-05-05 15:39:47 +0200 |
commit | 5300f1a5487f67f0bde8ee1081b799108668cb1d (patch) | |
tree | 5274ff496f2665487736a4eec23bf76601e4da44 /ui/sdl.c | |
parent | CPUPhysMemoryClient: Pass guest physical address not region offset (diff) | |
parent | NBD: Avoid leaking a couple of strings when the NBD device is closed (diff) | |
download | qemu-5300f1a5487f67f0bde8ee1081b799108668cb1d.tar.gz qemu-5300f1a5487f67f0bde8ee1081b799108668cb1d.tar.xz qemu-5300f1a5487f67f0bde8ee1081b799108668cb1d.zip |
Merge remote branch 'origin/master' into pci
Conflicts:
exec.c
Diffstat (limited to 'ui/sdl.c')
-rw-r--r-- | ui/sdl.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -812,6 +812,7 @@ void sdl_display_init(DisplayState *ds, int full_screen, int no_frame) uint8_t data = 0; DisplayAllocator *da; const SDL_VideoInfo *vi; + char *filename; #if defined(__APPLE__) /* always use generic keymaps */ @@ -844,6 +845,18 @@ void sdl_display_init(DisplayState *ds, int full_screen, int no_frame) vi = SDL_GetVideoInfo(); host_format = *(vi->vfmt); + /* Load a 32x32x4 image. White pixels are transparent. */ + filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, "qemu-icon.bmp"); + if (filename) { + SDL_Surface *image = SDL_LoadBMP(filename); + if (image) { + uint32_t colorkey = SDL_MapRGB(image->format, 255, 255, 255); + SDL_SetColorKey(image, SDL_SRCCOLORKEY, colorkey); + SDL_WM_SetIcon(image, NULL); + } + qemu_free(filename); + } + dcl = qemu_mallocz(sizeof(DisplayChangeListener)); dcl->dpy_update = sdl_update; dcl->dpy_resize = sdl_resize; |