comparison src/video/SDL_shape.c @ 4809:329708ffe2a7

Rejiggering the way shaped windows are created as preparation for OS X implementation. Fixed overdrive bug in test program that appears to have been introduced by someone other than myself.
author Eli Gottlieb <eligottlieb@gmail.com>
date Mon, 26 Jul 2010 17:27:04 -0400
parents 2ae79ed78a5a
children 7a602fd2121f
comparison
equal deleted inserted replaced
4808:2ae79ed78a5a 4809:329708ffe2a7
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
31 SDL_Window* SDL_CreateShapedWindow(const char *title,unsigned int x,unsigned int y,unsigned int w,unsigned int h,Uint32 flags) { 33 SDL_Window* SDL_CreateShapedWindow(const char *title,unsigned int x,unsigned int y,unsigned int w,unsigned int h,Uint32 flags) {
32 SDL_Window *result = SDL_CreateWindow(title,x,y,w,h,SDL_WINDOW_BORDERLESS | flags & !SDL_WINDOW_FULLSCREEN & !SDL_WINDOW_SHOWN); 34 SDL_VideoDisplay* display = SDL_ThisDisplay();
35 SDL_Window *result = display->device->shape_driver.CreateShapedWindow(title,x,y,w,h,SDL_WINDOW_BORDERLESS | flags & !SDL_WINDOW_FULLSCREEN & !SDL_WINDOW_SHOWN);
33 if(result != NULL) { 36 if(result != NULL) {
34 result->shaper = result->display->device->shape_driver.CreateShaper(result); 37 result->shaper = result->display->device->shape_driver.CreateShaper(result);
35 if(result->shaper != NULL) { 38 if(result->shaper != NULL) {
36 result->shaper->usershownflag = flags & SDL_WINDOW_SHOWN; 39 result->shaper->usershownflag = flags & SDL_WINDOW_SHOWN;
37 result->shaper->mode.mode = ShapeModeDefault; 40 result->shaper->mode.mode = ShapeModeDefault;