aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llwindow/llwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/llwindow/llwindow.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/linden/indra/llwindow/llwindow.cpp b/linden/indra/llwindow/llwindow.cpp
index 718ed55..5e05f03 100644
--- a/linden/indra/llwindow/llwindow.cpp
+++ b/linden/indra/llwindow/llwindow.cpp
@@ -247,7 +247,7 @@ LLWindow::LLWindow(BOOL fullscreen, U32 flags)
247 mFlags(flags), 247 mFlags(flags),
248 mHighSurrogate(0) 248 mHighSurrogate(0)
249{ 249{
250 for (U32 i = 0; i < 6; i++) 250 for (U32 i = 0; i < 8; i++)
251 { 251 {
252 mJoyAxis[i] = 0; 252 mJoyAxis[i] = 0;
253 } 253 }
@@ -275,7 +275,7 @@ void LLWindow::decBusyCount()
275 275
276F32 LLWindow::getJoystickAxis(U32 axis) 276F32 LLWindow::getJoystickAxis(U32 axis)
277{ 277{
278 if (axis < 6) 278 if (axis < 8)
279 { 279 {
280 return mJoyAxis[axis]; 280 return mJoyAxis[axis];
281 } 281 }
@@ -415,7 +415,7 @@ void LLSplashScreen::hide()
415// 415//
416 416
417// TODO: replace with std::set 417// TODO: replace with std::set
418static LLLinkedList<LLWindow> sWindowList; 418static std::set<LLWindow*> sWindowList;
419 419
420LLWindow* LLWindowManager::createWindow( 420LLWindow* LLWindowManager::createWindow(
421 char *title, 421 char *title,
@@ -481,13 +481,13 @@ LLWindow* LLWindowManager::createWindow(
481 llwarns << "LLWindowManager::create() : Error creating window." << llendl; 481 llwarns << "LLWindowManager::create() : Error creating window." << llendl;
482 return NULL; 482 return NULL;
483 } 483 }
484 sWindowList.addDataAtEnd(new_window); 484 sWindowList.insert(new_window);
485 return new_window; 485 return new_window;
486} 486}
487 487
488BOOL LLWindowManager::destroyWindow(LLWindow* window) 488BOOL LLWindowManager::destroyWindow(LLWindow* window)
489{ 489{
490 if (!sWindowList.checkData(window)) 490 if (sWindowList.find(window) == sWindowList.end())
491 { 491 {
492 llerrs << "LLWindowManager::destroyWindow() : Window pointer not valid, this window doesn't exist!" 492 llerrs << "LLWindowManager::destroyWindow() : Window pointer not valid, this window doesn't exist!"
493 << llendl; 493 << llendl;
@@ -496,7 +496,7 @@ BOOL LLWindowManager::destroyWindow(LLWindow* window)
496 496
497 window->close(); 497 window->close();
498 498
499 sWindowList.removeData(window); 499 sWindowList.erase(window);
500 500
501 delete window; 501 delete window;
502 502
@@ -505,5 +505,5 @@ BOOL LLWindowManager::destroyWindow(LLWindow* window)
505 505
506BOOL LLWindowManager::isWindowValid(LLWindow *window) 506BOOL LLWindowManager::isWindowValid(LLWindow *window)
507{ 507{
508 return sWindowList.checkData(window); 508 return sWindowList.find(window) != sWindowList.end();
509} 509}