diff options
author | Jacek Antonelli | 2008-08-15 23:44:50 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:44:50 -0500 |
commit | 89fe5dab825a62a0e3fd8d248cbc91c65eb2a426 (patch) | |
tree | bcff14b7888d04a2fec799c59369f6095224bd08 /linden/indra/newview/llstartup.cpp | |
parent | Second Life viewer sources 1.13.3.2 (diff) | |
download | meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.zip meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.gz meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.bz2 meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.xz |
Second Life viewer sources 1.14.0.0
Diffstat (limited to 'linden/indra/newview/llstartup.cpp')
-rw-r--r-- | linden/indra/newview/llstartup.cpp | 165 |
1 files changed, 83 insertions, 82 deletions
diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp index 916db16..cfdf899 100644 --- a/linden/indra/newview/llstartup.cpp +++ b/linden/indra/newview/llstartup.cpp | |||
@@ -44,9 +44,9 @@ | |||
44 | #include "audiosettings.h" | 44 | #include "audiosettings.h" |
45 | #include "llcachename.h" | 45 | #include "llcachename.h" |
46 | #include "llviewercontrol.h" | 46 | #include "llviewercontrol.h" |
47 | #include "llcrypto.h" | ||
48 | #include "lldir.h" | 47 | #include "lldir.h" |
49 | #include "lleconomy.h" | 48 | #include "lleconomy.h" |
49 | #include "llerrorcontrol.h" | ||
50 | #include "llfiltersd2xmlrpc.h" | 50 | #include "llfiltersd2xmlrpc.h" |
51 | #include "llfocusmgr.h" | 51 | #include "llfocusmgr.h" |
52 | #include "imageids.h" | 52 | #include "imageids.h" |
@@ -64,6 +64,7 @@ | |||
64 | #include "llversion.h" | 64 | #include "llversion.h" |
65 | #include "llvfs.h" | 65 | #include "llvfs.h" |
66 | #include "llwindow.h" // for shell_open | 66 | #include "llwindow.h" // for shell_open |
67 | #include "llxorcipher.h" // saved password, MAC address | ||
67 | #include "message.h" | 68 | #include "message.h" |
68 | #include "v3math.h" | 69 | #include "v3math.h" |
69 | 70 | ||
@@ -81,7 +82,6 @@ | |||
81 | #include "lleventnotifier.h" | 82 | #include "lleventnotifier.h" |
82 | #include "llface.h" | 83 | #include "llface.h" |
83 | #include "llfeaturemanager.h" | 84 | #include "llfeaturemanager.h" |
84 | #include "llfloateraccounthistory.h" | ||
85 | #include "llfloaterchat.h" | 85 | #include "llfloaterchat.h" |
86 | #include "llfloatergesture.h" | 86 | #include "llfloatergesture.h" |
87 | #include "llfloaterland.h" | 87 | #include "llfloaterland.h" |
@@ -118,6 +118,8 @@ | |||
118 | #include "llsky.h" | 118 | #include "llsky.h" |
119 | #include "llstatview.h" | 119 | #include "llstatview.h" |
120 | #include "llsurface.h" | 120 | #include "llsurface.h" |
121 | #include "lltexturecache.h" | ||
122 | #include "lltexturefetch.h" | ||
121 | #include "lltoolmgr.h" | 123 | #include "lltoolmgr.h" |
122 | #include "llui.h" | 124 | #include "llui.h" |
123 | #include "llurlwhitelist.h" | 125 | #include "llurlwhitelist.h" |
@@ -145,10 +147,13 @@ | |||
145 | #include "viewer.h" | 147 | #include "viewer.h" |
146 | #include "llmediaengine.h" | 148 | #include "llmediaengine.h" |
147 | #include "llfasttimerview.h" | 149 | #include "llfasttimerview.h" |
148 | #include "llmozlib.h" | ||
149 | #include "llweb.h" | 150 | #include "llweb.h" |
150 | #include "llfloaterhtml.h" | 151 | #include "llfloaterhtml.h" |
151 | 152 | ||
153 | #if LL_LIBXUL_ENABLED | ||
154 | #include "llmozlib.h" | ||
155 | #endif // LL_LIBXUL_ENABLED | ||
156 | |||
152 | #if LL_WINDOWS | 157 | #if LL_WINDOWS |
153 | #include "llwindebug.h" | 158 | #include "llwindebug.h" |
154 | #include "lldxhardware.h" | 159 | #include "lldxhardware.h" |
@@ -183,7 +188,6 @@ const char* SCREEN_LAST_FILENAME = "screen_last.bmp"; | |||
183 | // | 188 | // |
184 | // Imported globals | 189 | // Imported globals |
185 | // | 190 | // |
186 | extern LLPointer<LLImageGL> gStartImageGL; | ||
187 | extern S32 gStartImageWidth; | 191 | extern S32 gStartImageWidth; |
188 | extern S32 gStartImageHeight; | 192 | extern S32 gStartImageHeight; |
189 | extern std::string gSerialNumber; | 193 | extern std::string gSerialNumber; |
@@ -192,6 +196,8 @@ extern std::string gSerialNumber; | |||
192 | // local globals | 196 | // local globals |
193 | // | 197 | // |
194 | 198 | ||
199 | LLPointer<LLImageGL> gStartImageGL; | ||
200 | |||
195 | static LLHost gAgentSimHost; | 201 | static LLHost gAgentSimHost; |
196 | static BOOL gSkipOptionalUpdate = FALSE; | 202 | static BOOL gSkipOptionalUpdate = FALSE; |
197 | 203 | ||
@@ -250,7 +256,13 @@ public: | |||
250 | } | 256 | } |
251 | }; | 257 | }; |
252 | 258 | ||
253 | 259 | void update_texture_fetch() | |
260 | { | ||
261 | gTextureCache->update(1); // unpauses the texture cache thread | ||
262 | gImageDecodeThread->update(1); // unpauses the image thread | ||
263 | gTextureFetch->update(1); // unpauses the texture fetch thread | ||
264 | gImageList.updateImages(0.10f); | ||
265 | } | ||
254 | 266 | ||
255 | // Returns FALSE to skip other idle processing. Should only return | 267 | // Returns FALSE to skip other idle processing. Should only return |
256 | // TRUE when all initialization done. | 268 | // TRUE when all initialization done. |
@@ -301,8 +313,6 @@ BOOL idle_startup() | |||
301 | 313 | ||
302 | static BOOL samename = FALSE; | 314 | static BOOL samename = FALSE; |
303 | 315 | ||
304 | static BOOL did_precache = FALSE; | ||
305 | |||
306 | BOOL do_normal_idle = FALSE; | 316 | BOOL do_normal_idle = FALSE; |
307 | 317 | ||
308 | // HACK: These are things from the main loop that usually aren't done | 318 | // HACK: These are things from the main loop that usually aren't done |
@@ -391,14 +401,22 @@ BOOL idle_startup() | |||
391 | std::string message_template_path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"message_template.msg"); | 401 | std::string message_template_path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"message_template.msg"); |
392 | 402 | ||
393 | FILE* found_template = NULL; | 403 | FILE* found_template = NULL; |
394 | found_template = LLFile::fopen(message_template_path.c_str(), "r"); | 404 | found_template = LLFile::fopen(message_template_path.c_str(), "r"); /* Flawfinder: ignore */ |
395 | if (found_template) | 405 | if (found_template) |
396 | { | 406 | { |
397 | fclose(found_template); | 407 | fclose(found_template); |
398 | 408 | ||
409 | U32 port = gAgent.mViewerPort; | ||
410 | |||
411 | if ((NET_USE_OS_ASSIGNED_PORT == port) && // if nothing specified on command line (-port) | ||
412 | (gSavedSettings.getBOOL("ConnectionPortEnabled"))) | ||
413 | { | ||
414 | port = gSavedSettings.getU32("ConnectionPort"); | ||
415 | } | ||
416 | |||
399 | if(!start_messaging_system( | 417 | if(!start_messaging_system( |
400 | message_template_path, | 418 | message_template_path, |
401 | gAgent.mViewerPort, | 419 | port, |
402 | LL_VERSION_MAJOR, | 420 | LL_VERSION_MAJOR, |
403 | LL_VERSION_MINOR, | 421 | LL_VERSION_MINOR, |
404 | LL_VERSION_PATCH, | 422 | LL_VERSION_PATCH, |
@@ -432,7 +450,6 @@ BOOL idle_startup() | |||
432 | invalid_message_callback, | 450 | invalid_message_callback, |
433 | NULL); | 451 | NULL); |
434 | 452 | ||
435 | gErrorStream.setUTCTimestamp(gLogUTC); | ||
436 | if (gSavedSettings.getBOOL("LogMessages") || gLogMessages) | 453 | if (gSavedSettings.getBOOL("LogMessages") || gLogMessages) |
437 | { | 454 | { |
438 | llinfos << "Message logging activated!" << llendl; | 455 | llinfos << "Message logging activated!" << llendl; |
@@ -476,12 +493,13 @@ BOOL idle_startup() | |||
476 | #if LL_LIBXUL_ENABLED | 493 | #if LL_LIBXUL_ENABLED |
477 | set_startup_status(0.48f, "Initializing embedded web browser...", gAgent.mMOTD.c_str()); | 494 | set_startup_status(0.48f, "Initializing embedded web browser...", gAgent.mMOTD.c_str()); |
478 | display_startup(); | 495 | display_startup(); |
496 | llinfos << "Initializing embedded web browser..." << llendl; | ||
479 | 497 | ||
480 | #if LL_DARWIN | 498 | #if LL_DARWIN |
481 | // For Mac OS, we store both the shared libraries and the runtime files (chrome/, plugins/, etc) in | 499 | // For Mac OS, we store both the shared libraries and the runtime files (chrome/, plugins/, etc) in |
482 | // Second Life.app/Contents/MacOS/. This matches the way Firefox is distributed on the Mac. | 500 | // Second Life.app/Contents/MacOS/. This matches the way Firefox is distributed on the Mac. |
483 | std::string profileBaseDir(gDirUtilp->getExecutableDir()); | 501 | std::string profileBaseDir(gDirUtilp->getExecutableDir()); |
484 | #else | 502 | #elif LL_WINDOWS |
485 | std::string profileBaseDir( gDirUtilp->getExpandedFilename( LL_PATH_APP_SETTINGS, "" ) ); | 503 | std::string profileBaseDir( gDirUtilp->getExpandedFilename( LL_PATH_APP_SETTINGS, "" ) ); |
486 | profileBaseDir += gDirUtilp->getDirDelimiter(); | 504 | profileBaseDir += gDirUtilp->getDirDelimiter(); |
487 | #ifdef LL_DEBUG | 505 | #ifdef LL_DEBUG |
@@ -489,8 +507,28 @@ BOOL idle_startup() | |||
489 | #else | 507 | #else |
490 | profileBaseDir += "mozilla"; | 508 | profileBaseDir += "mozilla"; |
491 | #endif | 509 | #endif |
510 | #elif LL_LINUX | ||
511 | std::string profileBaseDir( gDirUtilp->getExpandedFilename( LL_PATH_APP_SETTINGS, "" ) ); | ||
512 | profileBaseDir += gDirUtilp->getDirDelimiter(); | ||
513 | profileBaseDir += "mozilla-runtime-linux-i686"; | ||
514 | #else | ||
515 | std::string profileBaseDir( gDirUtilp->getExpandedFilename( LL_PATH_APP_SETTINGS, "" ) ); | ||
516 | profileBaseDir += gDirUtilp->getDirDelimiter(); | ||
517 | profileBaseDir += "mozilla"; | ||
492 | #endif | 518 | #endif |
493 | LLMozLib::getInstance()->init( profileBaseDir, gDirUtilp->getExpandedFilename( LL_PATH_MOZILLA_PROFILE, "" ) ); | 519 | |
520 | #if LL_LINUX | ||
521 | // Yuck, Mozilla init plays with the locale - push/pop | ||
522 | // the locale to protect it, as exotic/non-C locales | ||
523 | // causes our code lots of general critical weirdness | ||
524 | // and crashness. (SL-35450) | ||
525 | char *saved_locale = setlocale(LC_ALL, NULL); | ||
526 | #endif // LL_LINUX | ||
527 | LLMozLib::getInstance()->init( profileBaseDir, gDirUtilp->getExpandedFilename( LL_PATH_MOZILLA_PROFILE, "" ) ); | ||
528 | #if LL_LINUX | ||
529 | if (saved_locale) | ||
530 | setlocale(LC_ALL, saved_locale); | ||
531 | #endif // LL_LINUX | ||
494 | 532 | ||
495 | std::ostringstream codec; | 533 | std::ostringstream codec; |
496 | codec << "[Second Life " << LL_VERSION_MAJOR << "." << LL_VERSION_MINOR << "." << LL_VERSION_PATCH << "." << LL_VERSION_BUILD << "]"; | 534 | codec << "[Second Life " << LL_VERSION_MAJOR << "." << LL_VERSION_MINOR << "." << LL_VERSION_PATCH << "." << LL_VERSION_BUILD << "]"; |
@@ -556,7 +594,7 @@ BOOL idle_startup() | |||
556 | lastname = gCmdLineLastName; | 594 | lastname = gCmdLineLastName; |
557 | 595 | ||
558 | LLMD5 pass((unsigned char*)gCmdLinePassword.c_str()); | 596 | LLMD5 pass((unsigned char*)gCmdLinePassword.c_str()); |
559 | char md5pass[33]; | 597 | char md5pass[33]; /* Flawfinder: ignore */ |
560 | pass.hex_digest(md5pass); | 598 | pass.hex_digest(md5pass); |
561 | password = md5pass; | 599 | password = md5pass; |
562 | 600 | ||
@@ -728,7 +766,7 @@ BOOL idle_startup() | |||
728 | if (gUserServerChoice == USERSERVER_OTHER) | 766 | if (gUserServerChoice == USERSERVER_OTHER) |
729 | { | 767 | { |
730 | gUserServer.setHostByName( server_label.c_str() ); | 768 | gUserServer.setHostByName( server_label.c_str() ); |
731 | snprintf(gUserServerName, MAX_STRING, "%s", server_label.c_str()); | 769 | snprintf(gUserServerName, MAX_STRING, "%s", server_label.c_str()); /* Flawfinder: ignore */ |
732 | } | 770 | } |
733 | } | 771 | } |
734 | 772 | ||
@@ -814,11 +852,12 @@ BOOL idle_startup() | |||
814 | case USERSERVER_SHAKTI: | 852 | case USERSERVER_SHAKTI: |
815 | case USERSERVER_DURGA: | 853 | case USERSERVER_DURGA: |
816 | case USERSERVER_SOMA: | 854 | case USERSERVER_SOMA: |
855 | case USERSERVER_VAAK: | ||
817 | case USERSERVER_GANGA: | 856 | case USERSERVER_GANGA: |
818 | case USERSERVER_UMA: | 857 | case USERSERVER_UMA: |
819 | { | 858 | { |
820 | const char* host_name = gUserServerDomainName[gUserServerChoice].mName; | 859 | const char* host_name = gUserServerDomainName[gUserServerChoice].mName; |
821 | sprintf(gUserServerName,"%s", host_name); | 860 | snprintf(gUserServerName, MAX_STRING, "%s", host_name); /* Flawfinder: ignore */ |
822 | llinfos << "Resolving " << | 861 | llinfos << "Resolving " << |
823 | gUserServerDomainName[gUserServerChoice].mLabel << | 862 | gUserServerDomainName[gUserServerChoice].mLabel << |
824 | " userserver domain name " << host_name << llendl; | 863 | " userserver domain name " << host_name << llendl; |
@@ -892,7 +931,7 @@ BOOL idle_startup() | |||
892 | } | 931 | } |
893 | 932 | ||
894 | write_debug("Userserver: "); | 933 | write_debug("Userserver: "); |
895 | char tmp_str[256]; | 934 | char tmp_str[256]; /* Flawfinder: ignore */ |
896 | gUserServer.getIPString(tmp_str, 256); | 935 | gUserServer.getIPString(tmp_str, 256); |
897 | write_debug(tmp_str); | 936 | write_debug(tmp_str); |
898 | write_debug("\n"); | 937 | write_debug("\n"); |
@@ -1128,7 +1167,7 @@ BOOL idle_startup() | |||
1128 | start << "home"; | 1167 | start << "home"; |
1129 | } | 1168 | } |
1130 | 1169 | ||
1131 | char hashed_mac_string[MD5HEX_STR_SIZE]; | 1170 | char hashed_mac_string[MD5HEX_STR_SIZE]; /* Flawfinder: ignore */ |
1132 | LLMD5 hashed_mac; | 1171 | LLMD5 hashed_mac; |
1133 | hashed_mac.update( gMACAddress, MAC_ADDRESS_BYTES ); | 1172 | hashed_mac.update( gMACAddress, MAC_ADDRESS_BYTES ); |
1134 | hashed_mac.finalize(); | 1173 | hashed_mac.finalize(); |
@@ -1442,7 +1481,7 @@ BOOL idle_startup() | |||
1442 | const char* look_at_str = gUserAuthp->getResponse("look_at"); | 1481 | const char* look_at_str = gUserAuthp->getResponse("look_at"); |
1443 | if (look_at_str) | 1482 | if (look_at_str) |
1444 | { | 1483 | { |
1445 | LLMemoryStream mstr((U8*)look_at_str, strlen(look_at_str)); | 1484 | LLMemoryStream mstr((U8*)look_at_str, strlen(look_at_str)); /* Flawfinder: ignore */ |
1446 | LLSD sd = LLSDNotationParser::parse(mstr); | 1485 | LLSD sd = LLSDNotationParser::parse(mstr); |
1447 | agent_start_look_at = ll_vector3_from_sd(sd); | 1486 | agent_start_look_at = ll_vector3_from_sd(sd); |
1448 | } | 1487 | } |
@@ -1464,7 +1503,7 @@ BOOL idle_startup() | |||
1464 | const char* home_location = gUserAuthp->getResponse("home"); | 1503 | const char* home_location = gUserAuthp->getResponse("home"); |
1465 | if(home_location) | 1504 | if(home_location) |
1466 | { | 1505 | { |
1467 | LLMemoryStream mstr((U8*)home_location, strlen(home_location)); | 1506 | LLMemoryStream mstr((U8*)home_location, strlen(home_location)); /* Flawfinder: ignore */ |
1468 | LLSD sd = LLSDNotationParser::parse(mstr); | 1507 | LLSD sd = LLSDNotationParser::parse(mstr); |
1469 | S32 region_x = sd["region_handle"][0].asInteger(); | 1508 | S32 region_x = sd["region_handle"][0].asInteger(); |
1470 | S32 region_y = sd["region_handle"][1].asInteger(); | 1509 | S32 region_y = sd["region_handle"][1].asInteger(); |
@@ -1582,6 +1621,8 @@ BOOL idle_startup() | |||
1582 | args["[ERROR_MESSAGE]"] = emsg.str(); | 1621 | args["[ERROR_MESSAGE]"] = emsg.str(); |
1583 | gViewerWindow->alertXml("ErrorMessage", args, login_alert_done); | 1622 | gViewerWindow->alertXml("ErrorMessage", args, login_alert_done); |
1584 | gStartupState = STATE_LOGIN_SHOW; | 1623 | gStartupState = STATE_LOGIN_SHOW; |
1624 | gAutoLogin = FALSE; | ||
1625 | show_connect_box = TRUE; | ||
1585 | } | 1626 | } |
1586 | } | 1627 | } |
1587 | else | 1628 | else |
@@ -1597,6 +1638,8 @@ BOOL idle_startup() | |||
1597 | args["[ERROR_MESSAGE]"] = emsg.str(); | 1638 | args["[ERROR_MESSAGE]"] = emsg.str(); |
1598 | gViewerWindow->alertXml("ErrorMessage", args, login_alert_done); | 1639 | gViewerWindow->alertXml("ErrorMessage", args, login_alert_done); |
1599 | gStartupState = STATE_LOGIN_SHOW; | 1640 | gStartupState = STATE_LOGIN_SHOW; |
1641 | gAutoLogin = FALSE; | ||
1642 | show_connect_box = TRUE; | ||
1600 | } | 1643 | } |
1601 | return do_normal_idle; | 1644 | return do_normal_idle; |
1602 | } | 1645 | } |
@@ -1629,6 +1672,9 @@ BOOL idle_startup() | |||
1629 | // | 1672 | // |
1630 | // Initialize classes w/graphics stuff. | 1673 | // Initialize classes w/graphics stuff. |
1631 | // | 1674 | // |
1675 | gImageList.doPrefetchImages(); | ||
1676 | update_texture_fetch(); | ||
1677 | |||
1632 | LLSurface::initClasses(); | 1678 | LLSurface::initClasses(); |
1633 | 1679 | ||
1634 | LLFace::initClass(); | 1680 | LLFace::initClass(); |
@@ -1690,7 +1736,7 @@ BOOL idle_startup() | |||
1690 | // Move the progress view in front of the UI | 1736 | // Move the progress view in front of the UI |
1691 | gViewerWindow->moveProgressViewToFront(); | 1737 | gViewerWindow->moveProgressViewToFront(); |
1692 | 1738 | ||
1693 | gErrorStream.setFixedBuffer(gDebugView->mDebugConsolep); | 1739 | LLError::logToFixedBuffer(gDebugView->mDebugConsolep); |
1694 | // set initial visibility of debug console | 1740 | // set initial visibility of debug console |
1695 | gDebugView->mDebugConsolep->setVisible(gSavedSettings.getBOOL("ShowDebugConsole")); | 1741 | gDebugView->mDebugConsolep->setVisible(gSavedSettings.getBOOL("ShowDebugConsole")); |
1696 | gDebugView->mStatViewp->setVisible(gSavedSettings.getBOOL("ShowDebugStats")); | 1742 | gDebugView->mStatViewp->setVisible(gSavedSettings.getBOOL("ShowDebugStats")); |
@@ -1791,7 +1837,7 @@ BOOL idle_startup() | |||
1791 | llinfos << "Decoding images..." << llendl; | 1837 | llinfos << "Decoding images..." << llendl; |
1792 | // For all images pre-loaded into viewer cache, decode them. | 1838 | // For all images pre-loaded into viewer cache, decode them. |
1793 | // Need to do this AFTER we init the sky | 1839 | // Need to do this AFTER we init the sky |
1794 | gImageList.decodeAllImages(); | 1840 | gImageList.decodeAllImages(2.f); |
1795 | gStartupState++; | 1841 | gStartupState++; |
1796 | 1842 | ||
1797 | // JC - Do this as late as possible to increase likelihood Purify | 1843 | // JC - Do this as late as possible to increase likelihood Purify |
@@ -2298,11 +2344,11 @@ BOOL idle_startup() | |||
2298 | // JC - 7/20/2002 | 2344 | // JC - 7/20/2002 |
2299 | gViewerWindow->sendShapeToSim(); | 2345 | gViewerWindow->sendShapeToSim(); |
2300 | 2346 | ||
2347 | // Ignore stipend information for now. Money history is on the web site. | ||
2301 | // if needed, show the money history window | 2348 | // if needed, show the money history window |
2302 | if (stipend_since_login && !gNoRender) | 2349 | //if (stipend_since_login && !gNoRender) |
2303 | { | 2350 | //{ |
2304 | LLFloaterAccountHistory::show(NULL); | 2351 | //} |
2305 | } | ||
2306 | 2352 | ||
2307 | if (!gAgent.isFirstLogin()) | 2353 | if (!gAgent.isFirstLogin()) |
2308 | { | 2354 | { |
@@ -2360,18 +2406,6 @@ BOOL idle_startup() | |||
2360 | if (STATE_PRECACHE == gStartupState) | 2406 | if (STATE_PRECACHE == gStartupState) |
2361 | { | 2407 | { |
2362 | do_normal_idle = TRUE; | 2408 | do_normal_idle = TRUE; |
2363 | if (!did_precache) | ||
2364 | { | ||
2365 | did_precache = TRUE; | ||
2366 | // Don't preload map information! The amount of data for all the | ||
2367 | // map items (icons for classifieds, avatar locations, etc.) is | ||
2368 | // huge, and not throttled. This overflows the downstream | ||
2369 | // pipe during startup, when lots of information is being sent. | ||
2370 | // The problem manifests itself as invisible avatars on login. JC | ||
2371 | //gWorldMap->setCurrentLayer(0); // pre-load layer 0 of the world map | ||
2372 | |||
2373 | gImageList.doPreloadImages(); // pre-load some images from static VFS | ||
2374 | } | ||
2375 | 2409 | ||
2376 | F32 timeout_frac = timeout.getElapsedTimeF32()/PRECACHING_DELAY; | 2410 | F32 timeout_frac = timeout.getElapsedTimeF32()/PRECACHING_DELAY; |
2377 | // wait precache-delay and for agent's avatar or a lot longer. | 2411 | // wait precache-delay and for agent's avatar or a lot longer. |
@@ -2382,6 +2416,7 @@ BOOL idle_startup() | |||
2382 | } | 2416 | } |
2383 | else | 2417 | else |
2384 | { | 2418 | { |
2419 | update_texture_fetch(); | ||
2385 | set_startup_status(0.50f + 0.50f * timeout_frac, "Precaching...", | 2420 | set_startup_status(0.50f + 0.50f * timeout_frac, "Precaching...", |
2386 | gAgent.mMOTD.c_str()); | 2421 | gAgent.mMOTD.c_str()); |
2387 | } | 2422 | } |
@@ -2410,6 +2445,7 @@ BOOL idle_startup() | |||
2410 | } | 2445 | } |
2411 | else | 2446 | else |
2412 | { | 2447 | { |
2448 | update_texture_fetch(); | ||
2413 | set_startup_status(0.f + 0.25f * wearables_time / MAX_WEARABLES_TIME, | 2449 | set_startup_status(0.f + 0.25f * wearables_time / MAX_WEARABLES_TIME, |
2414 | "Downloading clothing...", | 2450 | "Downloading clothing...", |
2415 | gAgent.mMOTD.c_str()); | 2451 | gAgent.mMOTD.c_str()); |
@@ -2512,34 +2548,6 @@ BOOL idle_startup() | |||
2512 | // local function definition | 2548 | // local function definition |
2513 | // | 2549 | // |
2514 | 2550 | ||
2515 | void unsupported_graphics_callback(S32 option, void* userdata) | ||
2516 | { | ||
2517 | if (0 == option) | ||
2518 | { | ||
2519 | llinfos << "User cancelled after driver check" << llendl; | ||
2520 | std::string help_path; | ||
2521 | help_path = gDirUtilp->getExpandedFilename(LL_PATH_HELP, | ||
2522 | "unsupported_card.html"); | ||
2523 | app_force_quit( help_path.c_str() ); | ||
2524 | } | ||
2525 | |||
2526 | LLPanelLogin::giveFocus(); | ||
2527 | } | ||
2528 | |||
2529 | void check_driver_callback(S32 option, void* userdata) | ||
2530 | { | ||
2531 | if (0 == option) | ||
2532 | { | ||
2533 | llinfos << "User cancelled after driver check" << llendl; | ||
2534 | std::string help_path; | ||
2535 | help_path = gDirUtilp->getExpandedFilename(LL_PATH_HELP, | ||
2536 | "graphics_driver_update.html"); | ||
2537 | app_force_quit( help_path.c_str() ); | ||
2538 | } | ||
2539 | |||
2540 | LLPanelLogin::giveFocus(); | ||
2541 | } | ||
2542 | |||
2543 | void login_show() | 2551 | void login_show() |
2544 | { | 2552 | { |
2545 | LLPanelLogin::show( gViewerWindow->getVirtualWindowRect(), | 2553 | LLPanelLogin::show( gViewerWindow->getVirtualWindowRect(), |
@@ -2547,7 +2555,7 @@ void login_show() | |||
2547 | login_callback, NULL ); | 2555 | login_callback, NULL ); |
2548 | 2556 | ||
2549 | // Make sure all the UI textures are present and decoded. | 2557 | // Make sure all the UI textures are present and decoded. |
2550 | gImageList.decodeAllImages(); | 2558 | gImageList.decodeAllImages(2.f); |
2551 | 2559 | ||
2552 | if( USERSERVER_OTHER == gUserServerChoice ) | 2560 | if( USERSERVER_OTHER == gUserServerChoice ) |
2553 | { | 2561 | { |
@@ -2569,6 +2577,7 @@ void login_show() | |||
2569 | LLPanelLogin::addServer( gUserServerDomainName[USERSERVER_GANGA].mLabel, USERSERVER_GANGA ); | 2577 | LLPanelLogin::addServer( gUserServerDomainName[USERSERVER_GANGA].mLabel, USERSERVER_GANGA ); |
2570 | LLPanelLogin::addServer( gUserServerDomainName[USERSERVER_UMA].mLabel, USERSERVER_UMA ); | 2578 | LLPanelLogin::addServer( gUserServerDomainName[USERSERVER_UMA].mLabel, USERSERVER_UMA ); |
2571 | LLPanelLogin::addServer( gUserServerDomainName[USERSERVER_SOMA].mLabel, USERSERVER_SOMA ); | 2579 | LLPanelLogin::addServer( gUserServerDomainName[USERSERVER_SOMA].mLabel, USERSERVER_SOMA ); |
2580 | LLPanelLogin::addServer( gUserServerDomainName[USERSERVER_VAAK].mLabel, USERSERVER_VAAK ); | ||
2572 | } | 2581 | } |
2573 | 2582 | ||
2574 | // Callback for when login screen is closed. Option 0 = connect, option 1 = quit. | 2583 | // Callback for when login screen is closed. Option 0 = connect, option 1 = quit. |
@@ -2628,7 +2637,7 @@ LLString load_password_from_disk() | |||
2628 | 2637 | ||
2629 | std::string filepath = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, | 2638 | std::string filepath = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, |
2630 | "password.dat"); | 2639 | "password.dat"); |
2631 | FILE* fp = LLFile::fopen(filepath.c_str(), "rb"); | 2640 | FILE* fp = LLFile::fopen(filepath.c_str(), "rb"); /* Flawfinder: ignore */ |
2632 | if (!fp) | 2641 | if (!fp) |
2633 | { | 2642 | { |
2634 | return hashed_password; | 2643 | return hashed_password; |
@@ -2675,7 +2684,7 @@ void save_password_to_disk(const char* hashed_password) | |||
2675 | } | 2684 | } |
2676 | else | 2685 | else |
2677 | { | 2686 | { |
2678 | FILE* fp = LLFile::fopen(filepath.c_str(), "wb"); | 2687 | FILE* fp = LLFile::fopen(filepath.c_str(), "wb"); /* Flawfinder: ignore */ |
2679 | if (!fp) | 2688 | if (!fp) |
2680 | { | 2689 | { |
2681 | return; | 2690 | return; |
@@ -2889,7 +2898,7 @@ void update_dialog_callback(S32 option, void *userdata) | |||
2889 | } | 2898 | } |
2890 | 2899 | ||
2891 | #if LL_WINDOWS | 2900 | #if LL_WINDOWS |
2892 | char ip[MAX_STRING]; | 2901 | char ip[MAX_STRING]; /* Flawfinder: ignore */ |
2893 | 2902 | ||
2894 | update_exe_path = gDirUtilp->getTempFilename(); | 2903 | update_exe_path = gDirUtilp->getTempFilename(); |
2895 | if (update_exe_path.empty()) | 2904 | if (update_exe_path.empty()) |
@@ -2934,7 +2943,7 @@ void update_dialog_callback(S32 option, void *userdata) | |||
2934 | // Figure out the program name. | 2943 | // Figure out the program name. |
2935 | const char* data_dir = gDirUtilp->getAppRODataDir().c_str(); | 2944 | const char* data_dir = gDirUtilp->getAppRODataDir().c_str(); |
2936 | // Roll back from the end, stopping at the first '\' | 2945 | // Roll back from the end, stopping at the first '\' |
2937 | const char* program_name = data_dir + strlen(data_dir); | 2946 | const char* program_name = data_dir + strlen(data_dir); /* Flawfinder: ignore */ |
2938 | while ( (data_dir != --program_name) && | 2947 | while ( (data_dir != --program_name) && |
2939 | *(program_name) != '\\'); | 2948 | *(program_name) != '\\'); |
2940 | 2949 | ||
@@ -2981,7 +2990,7 @@ void update_dialog_callback(S32 option, void *userdata) | |||
2981 | remove_marker_file(); // In case updater fails | 2990 | remove_marker_file(); // In case updater fails |
2982 | 2991 | ||
2983 | // Run the auto-updater. | 2992 | // Run the auto-updater. |
2984 | system(update_exe_path.c_str()); | 2993 | system(update_exe_path.c_str()); /* Flawfinder: ignore */ |
2985 | 2994 | ||
2986 | #elif LL_LINUX | 2995 | #elif LL_LINUX |
2987 | OSMessageBox("Automatic updating is not yet implemented for Linux.\n" | 2996 | OSMessageBox("Automatic updating is not yet implemented for Linux.\n" |
@@ -3019,8 +3028,8 @@ void use_circuit_callback(void**, S32 result) | |||
3019 | void register_viewer_callbacks(LLMessageSystem* msg) | 3028 | void register_viewer_callbacks(LLMessageSystem* msg) |
3020 | { | 3029 | { |
3021 | msg->setHandlerFuncFast(_PREHASH_LayerData, process_layer_data ); | 3030 | msg->setHandlerFuncFast(_PREHASH_LayerData, process_layer_data ); |
3022 | msg->setHandlerFuncFast(_PREHASH_ImageData, LLViewerImage::receiveImage ); | 3031 | msg->setHandlerFuncFast(_PREHASH_ImageData, LLViewerImageList::receiveImageHeader ); |
3023 | msg->setHandlerFuncFast(_PREHASH_ImagePacket, LLViewerImage::receiveImagePacket ); | 3032 | msg->setHandlerFuncFast(_PREHASH_ImagePacket, LLViewerImageList::receiveImagePacket ); |
3024 | msg->setHandlerFuncFast(_PREHASH_ObjectUpdate, process_object_update ); | 3033 | msg->setHandlerFuncFast(_PREHASH_ObjectUpdate, process_object_update ); |
3025 | msg->setHandlerFunc("ObjectUpdateCompressed", process_compressed_object_update ); | 3034 | msg->setHandlerFunc("ObjectUpdateCompressed", process_compressed_object_update ); |
3026 | msg->setHandlerFunc("ObjectUpdateCached", process_cached_object_update ); | 3035 | msg->setHandlerFunc("ObjectUpdateCached", process_cached_object_update ); |
@@ -3136,14 +3145,6 @@ void register_viewer_callbacks(LLMessageSystem* msg) | |||
3136 | 3145 | ||
3137 | msg->setHandlerFuncFast(_PREHASH_GrantGodlikePowers, process_grant_godlike_powers); | 3146 | msg->setHandlerFuncFast(_PREHASH_GrantGodlikePowers, process_grant_godlike_powers); |
3138 | 3147 | ||
3139 | msg->setHandlerFuncFast(_PREHASH_MoneySummaryReply, | ||
3140 | LLFloaterAccountHistory::processMoneySummaryReply); | ||
3141 | msg->setHandlerFuncFast(_PREHASH_MoneyDetailsReply, | ||
3142 | LLFloaterAccountHistory::processMoneyDetailsReply); | ||
3143 | msg->setHandlerFuncFast(_PREHASH_MoneyTransactionsReply, | ||
3144 | LLFloaterAccountHistory::processMoneyTransactionsReply); | ||
3145 | |||
3146 | // ASDF | ||
3147 | msg->setHandlerFuncFast(_PREHASH_GroupAccountSummaryReply, | 3148 | msg->setHandlerFuncFast(_PREHASH_GroupAccountSummaryReply, |
3148 | LLGroupMoneyPlanningTabEventHandler::processGroupAccountSummaryReply); | 3149 | LLGroupMoneyPlanningTabEventHandler::processGroupAccountSummaryReply); |
3149 | msg->setHandlerFuncFast(_PREHASH_GroupAccountDetailsReply, | 3150 | msg->setHandlerFuncFast(_PREHASH_GroupAccountDetailsReply, |
@@ -3869,7 +3870,7 @@ void dialog_choose_gender_first_start() | |||
3869 | // location_id = 1 => home position | 3870 | // location_id = 1 => home position |
3870 | void init_start_screen(S32 location_id) | 3871 | void init_start_screen(S32 location_id) |
3871 | { | 3872 | { |
3872 | if (gStartImageGL) | 3873 | if (gStartImageGL.notNull()) |
3873 | { | 3874 | { |
3874 | gStartImageGL = NULL; | 3875 | gStartImageGL = NULL; |
3875 | llinfos << "re-initializing start screen" << llendl; | 3876 | llinfos << "re-initializing start screen" << llendl; |