Revision 09cec717 ui/sdl.c
b/ui/sdl.c | ||
---|---|---|
812 | 812 |
uint8_t data = 0; |
813 | 813 |
DisplayAllocator *da; |
814 | 814 |
const SDL_VideoInfo *vi; |
815 |
char *filename; |
|
815 | 816 |
|
816 | 817 |
#if defined(__APPLE__) |
817 | 818 |
/* always use generic keymaps */ |
... | ... | |
844 | 845 |
vi = SDL_GetVideoInfo(); |
845 | 846 |
host_format = *(vi->vfmt); |
846 | 847 |
|
848 |
/* Load a 32x32x4 image. White pixels are transparent. */ |
|
849 |
filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, "qemu-icon.bmp"); |
|
850 |
if (filename) { |
|
851 |
SDL_Surface *image = SDL_LoadBMP(filename); |
|
852 |
if (image) { |
|
853 |
uint32_t colorkey = SDL_MapRGB(image->format, 255, 255, 255); |
|
854 |
SDL_SetColorKey(image, SDL_SRCCOLORKEY, colorkey); |
|
855 |
SDL_WM_SetIcon(image, NULL); |
|
856 |
} |
|
857 |
qemu_free(filename); |
|
858 |
} |
|
859 |
|
|
847 | 860 |
dcl = qemu_mallocz(sizeof(DisplayChangeListener)); |
848 | 861 |
dcl->dpy_update = sdl_update; |
849 | 862 |
dcl->dpy_resize = sdl_resize; |
Also available in: Unified diff