comparison src/video/bwindow/SDL_sysmouse.cc @ 3879:c82c1870c77a SDL-1.2

Fixed formatting
author Sam Lantinga <slouken@libsdl.org>
date Sun, 24 Sep 2006 15:36:37 +0000
parents 678576473849
children 4e29535b821b
comparison
equal deleted inserted replaced
3878:678576473849 3879:c82c1870c77a
25 #include <GameKit.h> 25 #include <GameKit.h>
26 26
27 #include "SDL_BWin.h" 27 #include "SDL_BWin.h"
28 28
29 extern "C" { 29 extern "C" {
30 #include "SDL_cursor_c.h" 30 #include "../SDL_cursor_c.h"
31 #include "SDL_sysmouse_c.h" 31 #include "SDL_sysmouse_c.h"
32 32
33 /* Convert bits to padded bytes */ 33 /* Convert bits to padded bytes */
34 #define PADDED_BITS(bits) ((bits+7)/8) 34 #define PADDED_BITS(bits) ((bits+7)/8)
35 35
126 } 126 }
127 127
128 /* Implementation by Christian Bauer <cbauer@student.physik.uni-mainz.de> */ 128 /* Implementation by Christian Bauer <cbauer@student.physik.uni-mainz.de> */
129 void BE_WarpWMCursor(_THIS, Uint16 x, Uint16 y) 129 void BE_WarpWMCursor(_THIS, Uint16 x, Uint16 y)
130 { 130 {
131 if (_this->screen && (_this->screen->flags & SDL_FULLSCREEN) ) { 131 if (_this->screen && (_this->screen->flags & SDL_FULLSCREEN)) {
132 SDL_PrivateMouseMotion(0, 0, x, y); 132 SDL_PrivateMouseMotion(0, 0, x, y);
133 } else { 133 } else {
134 BPoint pt(x, y); 134 BPoint pt(x, y);
135 SDL_Win->Lock(); 135 SDL_Win->Lock();
136 SDL_Win->ConvertToScreen(&pt); 136 SDL_Win->ConvertToScreen(&pt);
137 SDL_Win->Unlock(); 137 SDL_Win->Unlock();
138 set_mouse_position((int32)pt.x, (int32)pt.y); 138 set_mouse_position((int32)pt.x, (int32)pt.y);
139 } 139 }
140 } 140 }
141
141 /* Check to see if we need to enter or leave mouse relative mode */ 142 /* Check to see if we need to enter or leave mouse relative mode */
142 void BE_CheckMouseMode(_THIS) 143 void BE_CheckMouseMode(_THIS)
143 { 144 {
144 /* If the mouse is hidden and input is grabbed, we use relative mode */ 145 /* If the mouse is hidden and input is grabbed, we use relative mode */
145 if ( !(SDL_cursorstate & CURSOR_VISIBLE) && 146 if ( !(SDL_cursorstate & CURSOR_VISIBLE) &&