diff src/video/photon/SDL_ph_mouse.c @ 266:c6abdda2f666

Added QNX cleanups by Mike Gorchak (thanks!)
author Sam Lantinga <slouken@libsdl.org>
date Fri, 18 Jan 2002 18:14:03 +0000
parents e8157fcb3114
children 3d8b6b9f1e18
line wrap: on
line diff
--- a/src/video/photon/SDL_ph_mouse.c	Fri Jan 18 17:14:16 2002 +0000
+++ b/src/video/photon/SDL_ph_mouse.c	Fri Jan 18 18:14:03 2002 +0000
@@ -85,22 +85,23 @@
 	cursor->ph_cursor->bytesperline1 = (char)w/8;
 	cursor->ph_cursor->color1 = Pg_WHITE;
 	cursor->ph_cursor->size2.x = (short)w;
-    cursor->ph_cursor->size2.y = (short)h;
-    cursor->ph_cursor->offset2.x = (short)hot_x;
-    cursor->ph_cursor->offset2.y = (short)hot_y;
-    cursor->ph_cursor->bytesperline2 = (char)w/8;
-    cursor->ph_cursor->color2 = Pg_BLACK;
+        cursor->ph_cursor->size2.y = (short)h;
+        cursor->ph_cursor->offset2.x = (short)hot_x;
+        cursor->ph_cursor->offset2.y = (short)hot_y;
+        cursor->ph_cursor->bytesperline2 = (char)w/8;
+        cursor->ph_cursor->color2 = Pg_BLACK;
       
 	clen = (w/8)*h;
 
 	/* Copy the mask and the data to different 
 	   bitmap planes */
-	for ( i=0; i<clen; ++i ) {
-        cursor->ph_cursor->images[i] = data[i];
-        cursor->ph_cursor->images[i+clen] = mask[i];
-    }
+	for ( i=0; i<clen; ++i )
+        {
+           cursor->ph_cursor->images[i] = data[i];
+           cursor->ph_cursor->images[i+clen] = mask[i];
+        }
     
-    //#bytes following the hdr struct
+        //#bytes following the hdr struct
 	cursor->ph_cursor->hdr.len =sizeof(PhCursorDef_t) + clen*2 - sizeof(PhRegionDataHdr_t); 
 
 	return (cursor);
@@ -109,7 +110,6 @@
 
 PhCursorDef_t ph_GetWMPhCursor(WMcursor *cursor)
 {
-
 	return(*cursor->ph_cursor);
 }
 
@@ -120,8 +120,6 @@
 	int nargs = 0;
 	short cursor_is_defined = 0;
 
-
-
 	/* Don't do anything if the display is gone */
  	if ( window == NULL ) {
     	 return(0);
@@ -145,8 +143,8 @@
 			cursor_is_defined = 1;
 		}
 		if (cursor_is_defined)
-		 {
-    	    SDL_Lock_EventThread();
+		{
+    	                SDL_Lock_EventThread();
 			
 			if (PtSetResources( window, nargs, args ) < 0 )
 			{
@@ -163,15 +161,13 @@
 
 void ph_WarpWMCursor(_THIS, Uint16 x, Uint16 y)
 {
-
-	SDL_Lock_EventThread();
-	PhMoveCursorRel( PhInputGroup(NULL), x, y );	
-	SDL_Unlock_EventThread();
+   SDL_Lock_EventThread();
+   PhMoveCursorRel( PhInputGroup(NULL), x, y );	
+   SDL_Unlock_EventThread();
 }
 
 
 void ph_CheckMouseMode(_THIS)
 {
-
-	mouse_relative = 1;
+   mouse_relative = 1;
 }