aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llstartup.cpp
diff options
context:
space:
mode:
authorMcCabe Maxsted2008-12-06 11:27:57 -0700
committerMcCabe Maxsted2008-12-06 11:27:57 -0700
commit0b208f1539f79f5154a61214876b74a11374bec5 (patch)
tree86f5c04a8bc5b038f058035febc527cd79d8e15a /linden/indra/newview/llstartup.cpp
parentupdated to RC2 (diff)
downloadmeta-impy-0b208f1539f79f5154a61214876b74a11374bec5.zip
meta-impy-0b208f1539f79f5154a61214876b74a11374bec5.tar.gz
meta-impy-0b208f1539f79f5154a61214876b74a11374bec5.tar.bz2
meta-impy-0b208f1539f79f5154a61214876b74a11374bec5.tar.xz
openal on windows branch
Diffstat (limited to 'linden/indra/newview/llstartup.cpp')
-rw-r--r--linden/indra/newview/llstartup.cpp45
1 files changed, 18 insertions, 27 deletions
diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp
index 941787b..636cf31 100644
--- a/linden/indra/newview/llstartup.cpp
+++ b/linden/indra/newview/llstartup.cpp
@@ -583,43 +583,28 @@ bool idle_startup()
583 583
584 if (FALSE == gSavedSettings.getBOOL("NoAudio")) 584 if (FALSE == gSavedSettings.getBOOL("NoAudio"))
585 { 585 {
586 gAudiop = NULL; 586
587 587 gAudiop = (LLAudioEngine *) new LLAudioEngine_OpenAL();
588#ifdef LL_FMOD
589 gAudiop = (LLAudioEngine *) new LLAudioEngine_FMOD();
590#endif
591
592#ifdef LL_OPENAL
593 if (!gAudiop)
594 {
595 gAudiop = (LLAudioEngine *) new LLAudioEngine_OpenAL();
596 }
597#endif
598 588
599 if (gAudiop) 589 if (gAudiop)
600 { 590 {
601#if LL_WINDOWS 591 BOOL init = gAudiop->init(kAUDIO_NUM_SOURCES);
602 // FMOD on Windows needs the window handle to stop playing audio 592 if(!init)
603 // when window is minimized. JC
604 void* window_handle = (HWND)gViewerWindow->getPlatformWindow();
605#else
606 void* window_handle = NULL;
607#endif
608 bool init = gAudiop->init(kAUDIO_NUM_SOURCES, window_handle);
609 if(init)
610 { 593 {
611 gAudiop->setMuted(TRUE); 594 LL_WARNS("AppInit") << "Unable to initialize audio engine" << LL_ENDL;
595 gAudiop=NULL;
612 } 596 }
613 else 597 else
614 { 598 {
615 LL_WARNS("AppInit") << "Unable to initialize audio engine" << LL_ENDL; 599 gAudiop->setMuted(TRUE);
616 delete gAudiop; 600 LL_INFOS("AppInit") << "Audio Engine Initialized." << LL_ENDL;
617 gAudiop = NULL;
618 } 601 }
619 } 602 }
620 } 603 }
621 604 else
622 LL_INFOS("AppInit") << "Audio Engine Initialized." << LL_ENDL; 605 {
606 gAudiop = NULL;
607 }
623 608
624 if (LLTimer::knownBadTimer()) 609 if (LLTimer::knownBadTimer())
625 { 610 {
@@ -766,6 +751,12 @@ bool idle_startup()
766 gLoginMenuBarView->setVisible( TRUE ); 751 gLoginMenuBarView->setVisible( TRUE );
767 gLoginMenuBarView->setEnabled( TRUE ); 752 gLoginMenuBarView->setEnabled( TRUE );
768 753
754 // DEV-16927. The following code removes errant keystrokes that happen while the window is being
755 // first made visible.
756#ifdef _WIN32
757 MSG msg;
758 while( PeekMessage( &msg, /*All hWnds owned by this thread */ NULL, WM_KEYFIRST, WM_KEYLAST, PM_REMOVE ) );
759#endif
769 timeout.reset(); 760 timeout.reset();
770 return FALSE; 761 return FALSE;
771 } 762 }