Mercurial > sdl-ios-xcode
comparison src/SDL_compat.c @ 2967:e4a469d6ddab
Implemented SDL_SetWindowIcon(), with translucent icon support under X11.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Fri, 02 Jan 2009 17:39:48 +0000 |
parents | 9dde605c7540 |
children | 54fac87e1f34 |
comparison
equal
deleted
inserted
replaced
2966:c1e3621ba959 | 2967:e4a469d6ddab |
---|---|
37 static SDL_Surface *SDL_ShadowSurface = NULL; | 37 static SDL_Surface *SDL_ShadowSurface = NULL; |
38 static SDL_Surface *SDL_PublicSurface = NULL; | 38 static SDL_Surface *SDL_PublicSurface = NULL; |
39 static SDL_GLContext *SDL_VideoContext = NULL; | 39 static SDL_GLContext *SDL_VideoContext = NULL; |
40 static Uint32 SDL_VideoFlags = 0; | 40 static Uint32 SDL_VideoFlags = 0; |
41 static char *wm_title = NULL; | 41 static char *wm_title = NULL; |
42 static SDL_Surface *SDL_VideoIcon; | |
42 | 43 |
43 char * | 44 char * |
44 SDL_AudioDriverName(char *namebuf, int maxlen) | 45 SDL_AudioDriverName(char *namebuf, int maxlen) |
45 { | 46 { |
46 const char *name = SDL_GetCurrentAudioDriver(); | 47 const char *name = SDL_GetCurrentAudioDriver(); |
520 SDL_CreateWindow(wm_title, window_x, window_y, width, height, | 521 SDL_CreateWindow(wm_title, window_x, window_y, width, height, |
521 window_flags); | 522 window_flags); |
522 if (!SDL_VideoWindow) { | 523 if (!SDL_VideoWindow) { |
523 return NULL; | 524 return NULL; |
524 } | 525 } |
526 SDL_SetWindowIcon(SDL_VideoWindow, SDL_VideoIcon); | |
525 | 527 |
526 window_flags = SDL_GetWindowFlags(SDL_VideoWindow); | 528 window_flags = SDL_GetWindowFlags(SDL_VideoWindow); |
527 surface_flags = 0; | 529 surface_flags = 0; |
528 if (window_flags & SDL_WINDOW_FULLSCREEN) { | 530 if (window_flags & SDL_WINDOW_FULLSCREEN) { |
529 surface_flags |= SDL_FULLSCREEN; | 531 surface_flags |= SDL_FULLSCREEN; |
866 } | 868 } |
867 | 869 |
868 void | 870 void |
869 SDL_WM_SetIcon(SDL_Surface * icon, Uint8 * mask) | 871 SDL_WM_SetIcon(SDL_Surface * icon, Uint8 * mask) |
870 { | 872 { |
871 /* FIXME */ | 873 SDL_VideoIcon = icon; |
872 } | 874 } |
873 | 875 |
874 int | 876 int |
875 SDL_WM_IconifyWindow(void) | 877 SDL_WM_IconifyWindow(void) |
876 { | 878 { |