diff 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
line wrap: on
line diff
--- a/src/video/SDL_shape.c	Fri Jul 23 01:48:42 2010 -0400
+++ b/src/video/SDL_shape.c	Mon Jul 26 17:27:04 2010 -0400
@@ -28,8 +28,11 @@
 #include "SDL_surface.h"
 #include "SDL_shape.h"
 
+extern SDL_VideoDisplay* SDL_ThisDisplay();
+
 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_VideoDisplay* display = SDL_ThisDisplay();
+	SDL_Window *result = display->device->shape_driver.CreateShapedWindow(title,x,y,w,h,SDL_WINDOW_BORDERLESS | flags & !SDL_WINDOW_FULLSCREEN & !SDL_WINDOW_SHOWN);
 	if(result != NULL) {
 		result->shaper = result->display->device->shape_driver.CreateShaper(result);
 		if(result->shaper != NULL) {