changeset 4845:61cb2d20a46f

Fixing bugs introduced into X11 shaping implementation by merge.
author Eli Gottlieb <eligottlieb@gmail.com>
date Tue, 10 Aug 2010 15:45:59 -0400
parents c4f5bcaf7572
children 4f1573996a65
files src/video/x11/SDL_x11shape.c
diffstat 1 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/video/x11/SDL_x11shape.c	Tue Aug 10 15:39:46 2010 -0400
+++ b/src/video/x11/SDL_x11shape.c	Tue Aug 10 15:45:59 2010 -0400
@@ -20,7 +20,7 @@
     eligottlieb@gmail.com
 */
 
-#include <assert.h>
+#include "SDL_assert.h"
 #include "SDL_x11video.h"
 #include "SDL_x11shape.h"
 #include "SDL_x11window.h"
@@ -30,7 +30,7 @@
     return SDL_CreateWindow(title,x,y,w,h,flags);
 }
 
-SDL_WindowShaper* 
+SDL_WindowShaper*
 X11_CreateShaper(SDL_Window* window) {
     SDL_WindowShaper* result = NULL;
 
@@ -41,23 +41,23 @@
         result->mode.mode = ShapeModeDefault;
         result->mode.parameters.binarizationCutoff = 1;
         result->usershownflag = 0;
-        SDL_ShapeData* data = malloc(sizeof(SDL_ShapeData));
+        SDL_ShapeData* data = SDL_malloc(sizeof(SDL_ShapeData));
         result->driverdata = data;
         data->bitmapsize = 0;
         data->bitmap = NULL;
         window->shaper = result;
         int resized_properly = X11_ResizeWindowShape(window);
-        assert(resized_properly == 0);
+        SDL_assert(resized_properly == 0);
     }
 #endif
 
     return result;
 }
 
-int 
+int
 X11_ResizeWindowShape(SDL_Window* window) {
     SDL_ShapeData* data = window->shaper->driverdata;
-    assert(data != NULL);
+    SDL_assert(data != NULL);
     
     unsigned int bitmapsize = window->w / 8;
     if(window->w % 8 > 0)
@@ -80,7 +80,7 @@
     return 0;
 }
     
-int 
+int
 X11_SetWindowShape(SDL_WindowShaper *shaper,SDL_Surface *shape,SDL_WindowShapeMode *shapeMode) {
     if(shaper == NULL || shape == NULL || shaper->driverdata == NULL)
         return -1;