Mercurial > sdl-ios-xcode
diff src/video/SDL_shape.c @ 4849:0b918c186938
Finally got the Win32 API code for shaping to work! Just need to fix SDL_CalculateShapeTree() now!
author | egottlieb |
---|---|
date | Sat, 14 Aug 2010 16:14:36 -0400 |
parents | 40b46225e3cf |
children | 14870d46ee2d |
line wrap: on
line diff
--- a/src/video/SDL_shape.c Thu Aug 12 18:17:15 2010 -0400 +++ b/src/video/SDL_shape.c Sat Aug 14 16:14:36 2010 -0400 @@ -32,7 +32,7 @@ SDL_Window* SDL_CreateShapedWindow(const char *title,unsigned int x,unsigned int y,unsigned int w,unsigned int h,Uint32 flags) { - SDL_Window *result = SDL_CreateWindow(title,x,y,w,h,SDL_WINDOW_BORDERLESS | flags & !SDL_WINDOW_FULLSCREEN & !SDL_WINDOW_SHOWN); + SDL_Window *result = SDL_CreateWindow(title,x,y,w,h,flags | SDL_WINDOW_BORDERLESS & !SDL_WINDOW_FULLSCREEN & !SDL_WINDOW_SHOWN); if(result != NULL) { result->shaper = result->display->device->shape_driver.CreateShaper(result); if(result->shaper != NULL) { @@ -226,7 +226,7 @@ } int -SDL_SetWindowShape(SDL_Window *window,SDL_Surface *shape,SDL_WindowShapeMode *shapeMode) { +SDL_SetWindowShape(SDL_Window *window,SDL_Surface *shape,SDL_WindowShapeMode *shape_mode) { int result; if(window == NULL || !SDL_IsShapedWindow(window)) //The window given was not a shapeable window. @@ -235,9 +235,9 @@ //Invalid shape argument. return SDL_INVALID_SHAPE_ARGUMENT; - if(shapeMode != NULL) - window->shaper->mode = *shapeMode; - result = window->display->device->shape_driver.SetWindowShape(window->shaper,shape,shapeMode); + if(shape_mode != NULL) + window->shaper->mode = *shape_mode; + result = window->display->device->shape_driver.SetWindowShape(window->shaper,shape,shape_mode); window->shaper->hasshape = SDL_TRUE; if((window->shaper->usershownflag & SDL_WINDOW_SHOWN) == SDL_WINDOW_SHOWN) { SDL_SetWindowPosition(window,window->x,window->y); @@ -255,9 +255,9 @@ } int -SDL_GetShapedWindowMode(SDL_Window *window,SDL_WindowShapeMode *shapeMode) { +SDL_GetShapedWindowMode(SDL_Window *window,SDL_WindowShapeMode *shape_mode) { if(window != NULL && SDL_IsShapedWindow(window)) { - if(shapeMode == NULL) { + if(shape_mode == NULL) { if(SDL_WindowHasAShape(window)) //The window given has a shape. return 0; @@ -266,7 +266,7 @@ return SDL_WINDOW_LACKS_SHAPE; } else { - *shapeMode = window->shaper->mode; + *shape_mode = window->shaper->mode; return 0; } }