changeset 4932:0d1bb1ce9d15

Removed carriage returns
author Sam Lantinga <slouken@libsdl.org>
date Wed, 29 Dec 2010 15:23:54 -0800
parents fc718f26c15e
children 81a34196b980
files src/video/win32/SDL_win32events.c
diffstat 1 files changed, 31 insertions(+), 31 deletions(-) [+]
line wrap: on
line diff
--- a/src/video/win32/SDL_win32events.c	Wed Dec 15 21:31:12 2010 -0500
+++ b/src/video/win32/SDL_win32events.c	Wed Dec 29 15:23:54 2010 -0800
@@ -56,9 +56,9 @@
 #ifndef WM_INPUT
 #define WM_INPUT 0x00ff
 #endif
-#ifndef WM_TOUCH
+#ifndef WM_TOUCH
 #define WM_TOUCH 0x0240
-#endif
+#endif
 
 
 static WPARAM
@@ -520,11 +520,11 @@
         break;
 
 	case WM_TOUCH:
-		{
-			UINT i, num_inputs = LOWORD(wParam);
-			PTOUCHINPUT inputs = SDL_stack_alloc(TOUCHINPUT, num_inputs);
+		{
+			UINT i, num_inputs = LOWORD(wParam);
+			PTOUCHINPUT inputs = SDL_stack_alloc(TOUCHINPUT, num_inputs);
 			if (data->videodata->GetTouchInputInfo((HTOUCHINPUT)lParam, num_inputs, inputs, sizeof(TOUCHINPUT))) {
-				RECT rect;
+				RECT rect;
 				float x, y;
 
 				if (!GetClientRect(hwnd, &rect) ||
@@ -532,14 +532,14 @@
 					break;
 				}
 				ClientToScreen(hwnd, (LPPOINT) & rect);
-				ClientToScreen(hwnd, (LPPOINT) & rect + 1);
-				rect.top *= 100;
-				rect.left *= 100;
-				rect.bottom *= 100;
-				rect.right *= 100;
-
-				for (i = 0; i < num_inputs; ++i) {
-					PTOUCHINPUT input = &inputs[i];
+				ClientToScreen(hwnd, (LPPOINT) & rect + 1);
+				rect.top *= 100;
+				rect.left *= 100;
+				rect.bottom *= 100;
+				rect.right *= 100;
+
+				for (i = 0; i < num_inputs; ++i) {
+					PTOUCHINPUT input = &inputs[i];
 
 					SDL_TouchID touchId = (SDL_TouchID)input->hSource;
 					if (!SDL_GetTouch(touchId)) {
@@ -559,26 +559,26 @@
 						if (SDL_AddTouch(&touch, "") < 0) {
 							continue;
 						}
-					}
-
-					// Get the normalized coordinates for the window
-					x = (float)(input->x - rect.left)/(rect.right - rect.left);
-					y = (float)(input->y - rect.top)/(rect.bottom - rect.top);
-
+					}
+
+					// Get the normalized coordinates for the window
+					x = (float)(input->x - rect.left)/(rect.right - rect.left);
+					y = (float)(input->y - rect.top)/(rect.bottom - rect.top);
+
 					if (input->dwFlags & TOUCHEVENTF_DOWN) {
-						SDL_SendFingerDown(touchId, input->dwID, SDL_TRUE, x, y, 1);
-					}
+						SDL_SendFingerDown(touchId, input->dwID, SDL_TRUE, x, y, 1);
+					}
 					if (input->dwFlags & TOUCHEVENTF_MOVE) {
-						SDL_SendTouchMotion(touchId, input->dwID, SDL_FALSE, x, y, 1);
-					}
+						SDL_SendTouchMotion(touchId, input->dwID, SDL_FALSE, x, y, 1);
+					}
 					if (input->dwFlags & TOUCHEVENTF_UP) {
-						SDL_SendFingerDown(touchId, input->dwID, SDL_FALSE, x, y, 1);
-					}
-				}
-			}
-			SDL_stack_free(inputs);
-
-			data->videodata->CloseTouchInputHandle((HTOUCHINPUT)lParam);
+						SDL_SendFingerDown(touchId, input->dwID, SDL_FALSE, x, y, 1);
+					}
+				}
+			}
+			SDL_stack_free(inputs);
+
+			data->videodata->CloseTouchInputHandle((HTOUCHINPUT)lParam);
 			return 0;
 		}
 		break;