Legend:
- Unmodified
- Added
- Removed
-
trunk/src/input.cpp
r221 r233 30 30 31 31 public: 32 int dummy; 32 InputData() 33 { 34 mouse.x = mouse.y = -1; 35 } 36 37 Int2 mouse; 33 38 } 34 39 inputdata; … … 60 65 } 61 66 67 void Input::SetMousePos(Int2 coord) 68 { 69 data->mouse = coord; 70 } 71 72 Int2 Input::GetMousePos() 73 { 74 return data->mouse; 75 } 76 -
trunk/src/input.h
r221 r233 23 23 public: 24 24 static Float2 GetAxis(int axis); 25 static void SetMousePos(Int2 coord); 26 static Int2 GetMousePos(); 25 27 }; 26 28 -
trunk/src/sdlinput.cpp
r221 r233 49 49 50 50 /* Handle mouse input */ 51 SDL_GetMouseState(&data->mx, &data->my); 51 Int2 mouse; 52 if (SDL_GetAppState() & SDL_APPMOUSEFOCUS) 53 SDL_GetMouseState(&mouse.x, &mouse.y); 54 else 55 mouse.x = mouse.y = -1; 56 Input::SetMousePos(mouse); 52 57 53 58 /* Handle keyboard and WM events */
Note: See TracChangeset
for help on using the changeset viewer.