diff src/video/SDL_shape.c @ 4801:506a9165491b

Added #define's for error codes returned from SDL shaped-window API.
author Eli Gottlieb <eligottlieb@gmail.com>
date Sun, 18 Jul 2010 22:24:52 -0400
parents a0e096916474
children f14a8c05f5bb
line wrap: on
line diff
--- a/src/video/SDL_shape.c	Sun Jul 18 22:17:52 2010 -0400
+++ b/src/video/SDL_shape.c	Sun Jul 18 22:24:52 2010 -0400
@@ -82,10 +82,10 @@
 	int result;
 	if(window == NULL || !SDL_IsShapedWindow(window))
 		//The window given was not a shapeable window.
-		return -2;
+		return SDL_NONSHAPEABLE_WINDOW;
 	if(shape == NULL)
 		//Invalid shape argument.
-		return -1;
+		return SDL_INVALID_SHAPE_ARGUMENT;
 	
 	if(shapeMode != NULL) {
 		switch(shapeMode->mode) {
@@ -123,7 +123,7 @@
 				return 0;
 			else
 				//The window given is shapeable but lacks a shape.
-				return -2;
+				return SDL_WINDOW_LACKS_SHAPE;
 		}
 		else {
 			if(window->shaper->alphacutoff != 1) {
@@ -137,5 +137,5 @@
 	}
 	else
 		//The window given is not a valid shapeable window.
-		return -1;
+		return SDL_NONSHAPEABLE_WINDOW;
 }