Mercurial > sdl-ios-xcode
comparison src/video/SDL_shape.c @ 4810:7a602fd2121f
OK, it appears that dramatic hacks are not necessary to make Cocoa work...
author | Eli Gottlieb <eligottlieb@gmail.com> |
---|---|
date | Mon, 26 Jul 2010 20:41:45 -0400 |
parents | 329708ffe2a7 |
children | 5b4c7d7d8953 |
comparison
equal
deleted
inserted
replaced
4809:329708ffe2a7 | 4810:7a602fd2121f |
---|---|
26 #include "SDL_sysvideo.h" | 26 #include "SDL_sysvideo.h" |
27 #include "SDL_pixels.h" | 27 #include "SDL_pixels.h" |
28 #include "SDL_surface.h" | 28 #include "SDL_surface.h" |
29 #include "SDL_shape.h" | 29 #include "SDL_shape.h" |
30 | 30 |
31 extern SDL_VideoDisplay* SDL_ThisDisplay(); | |
32 | |
33 SDL_Window* SDL_CreateShapedWindow(const char *title,unsigned int x,unsigned int y,unsigned int w,unsigned int h,Uint32 flags) { | 31 SDL_Window* SDL_CreateShapedWindow(const char *title,unsigned int x,unsigned int y,unsigned int w,unsigned int h,Uint32 flags) { |
34 SDL_VideoDisplay* display = SDL_ThisDisplay(); | 32 SDL_Window *result = SDL_CreateWindow(title,x,y,w,h,SDL_WINDOW_BORDERLESS | flags & !SDL_WINDOW_FULLSCREEN & !SDL_WINDOW_SHOWN); |
35 SDL_Window *result = display->device->shape_driver.CreateShapedWindow(title,x,y,w,h,SDL_WINDOW_BORDERLESS | flags & !SDL_WINDOW_FULLSCREEN & !SDL_WINDOW_SHOWN); | |
36 if(result != NULL) { | 33 if(result != NULL) { |
37 result->shaper = result->display->device->shape_driver.CreateShaper(result); | 34 result->shaper = result->display->device->shape_driver.CreateShaper(result); |
38 if(result->shaper != NULL) { | 35 if(result->shaper != NULL) { |
39 result->shaper->usershownflag = flags & SDL_WINDOW_SHOWN; | 36 result->shaper->usershownflag = flags & SDL_WINDOW_SHOWN; |
40 result->shaper->mode.mode = ShapeModeDefault; | 37 result->shaper->mode.mode = ShapeModeDefault; |