diff options
author | Jacek Antonelli | 2008-08-15 23:44:54 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:44:54 -0500 |
commit | b2afb8800bb033a04bb3ecdf0363068d56648ef1 (patch) | |
tree | 3568129b5bbddb47cd39d622b4137a8fbff4abaf /linden/indra/llwindow/llwindow.cpp | |
parent | Second Life viewer sources 1.14.0.1 (diff) | |
download | meta-impy-b2afb8800bb033a04bb3ecdf0363068d56648ef1.zip meta-impy-b2afb8800bb033a04bb3ecdf0363068d56648ef1.tar.gz meta-impy-b2afb8800bb033a04bb3ecdf0363068d56648ef1.tar.bz2 meta-impy-b2afb8800bb033a04bb3ecdf0363068d56648ef1.tar.xz |
Second Life viewer sources 1.15.0.2
Diffstat (limited to 'linden/indra/llwindow/llwindow.cpp')
-rw-r--r-- | linden/indra/llwindow/llwindow.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/linden/indra/llwindow/llwindow.cpp b/linden/indra/llwindow/llwindow.cpp index 20fc84e..134e606 100644 --- a/linden/indra/llwindow/llwindow.cpp +++ b/linden/indra/llwindow/llwindow.cpp | |||
@@ -4,6 +4,7 @@ | |||
4 | * | 4 | * |
5 | * Copyright (c) 2001-2007, Linden Research, Inc. | 5 | * Copyright (c) 2001-2007, Linden Research, Inc. |
6 | * | 6 | * |
7 | * Second Life Viewer Source Code | ||
7 | * The source code in this file ("Source Code") is provided by Linden Lab | 8 | * The source code in this file ("Source Code") is provided by Linden Lab |
8 | * to you under the terms of the GNU General Public License, version 2.0 | 9 | * to you under the terms of the GNU General Public License, version 2.0 |
9 | * ("GPL"), unless you have obtained a separate licensing agreement | 10 | * ("GPL"), unless you have obtained a separate licensing agreement |
@@ -232,6 +233,15 @@ LLWindow::LLWindow(BOOL fullscreen, U32 flags) | |||
232 | mHideCursorPermanent(FALSE), | 233 | mHideCursorPermanent(FALSE), |
233 | mFlags(flags) | 234 | mFlags(flags) |
234 | { | 235 | { |
236 | for (U32 i = 0; i < 6; i++) | ||
237 | { | ||
238 | mJoyAxis[i] = 0; | ||
239 | } | ||
240 | |||
241 | for (U32 i = 0; i < 16; i++) | ||
242 | { | ||
243 | mJoyButtonState[i] = 0; | ||
244 | } | ||
235 | } | 245 | } |
236 | 246 | ||
237 | // virtual | 247 | // virtual |
@@ -249,6 +259,24 @@ void LLWindow::decBusyCount() | |||
249 | } | 259 | } |
250 | } | 260 | } |
251 | 261 | ||
262 | F32 LLWindow::getJoystickAxis(U32 axis) | ||
263 | { | ||
264 | if (axis < 6) | ||
265 | { | ||
266 | return mJoyAxis[axis]; | ||
267 | } | ||
268 | return 0.f; | ||
269 | } | ||
270 | |||
271 | U8 LLWindow::getJoystickButton(U32 button) | ||
272 | { | ||
273 | if (button < 16) | ||
274 | { | ||
275 | return mJoyButtonState[button]; | ||
276 | } | ||
277 | return 0; | ||
278 | } | ||
279 | |||
252 | void LLWindow::setCallbacks(LLWindowCallbacks *callbacks) | 280 | void LLWindow::setCallbacks(LLWindowCallbacks *callbacks) |
253 | { | 281 | { |
254 | mCallbacks = callbacks; | 282 | mCallbacks = callbacks; |