Merge viewer-neko

master
Ansariel 2017-09-07 21:49:12 +02:00
commit 615336a4d4
37 changed files with 264 additions and 108 deletions

View File

@ -260,6 +260,70 @@ bool LLApp::parseCommandOptions(int argc, char** argv)
return true;
}
bool LLApp::parseCommandOptions(int argc, wchar_t** wargv)
{
LLSD commands;
std::string name;
std::string value;
for(int ii = 1; ii < argc; ++ii)
{
if(wargv[ii][0] != '-')
{
LL_INFOS() << "Did not find option identifier while parsing token: "
<< wargv[ii] << LL_ENDL;
return false;
}
int offset = 1;
if(wargv[ii][1] == '-') ++offset;
#if LL_WINDOWS
name.assign(utf16str_to_utf8str(&wargv[ii][offset]));
#else
name.assign(wstring_to_utf8str(&wargv[ii][offset]));
#endif
if(((ii+1) >= argc) || (wargv[ii+1][0] == '-'))
{
// we found another option after this one or we have
// reached the end. simply record that this option was
// found and continue.
int flag = name.compare("logfile");
if (0 == flag)
{
commands[name] = "log";
}
else
{
commands[name] = true;
}
continue;
}
++ii;
#if LL_WINDOWS
value.assign(utf16str_to_utf8str((wargv[ii])));
#else
value.assign(wstring_to_utf8str((wargv[ii])));
#endif
#if LL_WINDOWS
//Windows changed command line parsing. Deal with it.
S32 slen = value.length() - 1;
S32 start = 0;
S32 end = slen;
if (wargv[ii][start]=='"')start++;
if (wargv[ii][end]=='"')end--;
if (start!=0 || end!=slen)
{
value = value.substr (start,end);
}
#endif
commands[name] = value;
}
setOptionData(PRIORITY_COMMAND_LINE, commands);
return true;
}
void LLApp::manageLiveFile(LLLiveFile* livefile)
{
@ -361,7 +425,7 @@ void LLApp::setupErrorHandling(bool second_instance, EMiniDumpType minidump_type
std::wstring wpipe_name;
wpipe_name = mCrashReportPipeStr + wstringize(getPid());
const std::wstring wdump_path(wstringize(mDumpPath));
const std::wstring wdump_path(utf8str_to_utf16str(mDumpPath));
int retries = 30;
for (; retries > 0; --retries)
@ -539,12 +603,9 @@ void LLApp::setMiniDumpDir(const std::string &path)
if(mExceptionHandler == 0) return;
#ifdef LL_WINDOWS
// <FS:ND> Make sure to pass a proper unicode string to breapad. path is UTF8, not MBCS
// wchar_t buffer[MAX_MINDUMP_PATH_LENGTH];
// mbstowcs(buffer, mDumpPath.c_str(), MAX_MINDUMP_PATH_LENGTH);
// mExceptionHandler->set_dump_path(std::wstring(buffer));
mExceptionHandler->set_dump_path( utf8str_to_utf16str(mDumpPath) );
// </FS:ND>
std::wstring buffer(utf8str_to_utf16str(mDumpPath));
if (buffer.size() > MAX_MINDUMP_PATH_LENGTH) buffer.resize(MAX_MINDUMP_PATH_LENGTH);
mExceptionHandler->set_dump_path(buffer);
#elif LL_LINUX
//google_breakpad::MinidumpDescriptor desc("/tmp"); //path works in debug fails in production inside breakpad lib so linux gets a little less stack reporting until it is patched.
google_breakpad::MinidumpDescriptor desc(mDumpPath); //path works in debug fails in production inside breakpad lib so linux gets a little less stack reporting until it is patched.

View File

@ -106,7 +106,7 @@ public:
LLSD getOption(const std::string& name) const;
/**
* @brief Parse command line options and insert them into
* @brief Parse ASCII command line options and insert them into
* application command line options.
*
* The name inserted into the option will have leading option
@ -119,6 +119,20 @@ public:
*/
bool parseCommandOptions(int argc, char** argv);
/**
* @brief Parse Unicode command line options and insert them into
* application command line options.
*
* The name inserted into the option will have leading option
* identifiers (a minus or double minus) stripped. All options
* with values will be stored as a string, while all options
* without values will be stored as true.
* @param argc The argc passed into main().
* @param wargv The wargv passed into main().
* @return Returns true if the parse succeeded.
*/
bool parseCommandOptions(int argc, wchar_t** wargv);
/**
* @brief Keep track of live files automatically.
*

View File

@ -132,8 +132,8 @@ void LLMetricPerformanceTesterBasic::doAnalysisMetrics(std::string baseline, std
}
// Open baseline and current target, exit if one is inexistent
std::ifstream base_is(baseline.c_str());
std::ifstream target_is(target.c_str());
llifstream base_is(baseline.c_str());
llifstream target_is(target.c_str());
if (!base_is.is_open() || !target_is.is_open())
{
LL_WARNS() << "'-analyzeperformance' error : baseline or current target file inexistent" << LL_ENDL;
@ -151,7 +151,7 @@ void LLMetricPerformanceTesterBasic::doAnalysisMetrics(std::string baseline, std
target_is.close();
//output comparision
std::ofstream os(output.c_str());
llofstream os(output.c_str());
os << "Label, Metric, Base(B), Target(T), Diff(T-B), Percentage(100*T/B)\n";
for(LLMetricPerformanceTesterBasic::name_tester_map_t::iterator iter = LLMetricPerformanceTesterBasic::sTesterMap.begin() ;
@ -212,7 +212,7 @@ void LLMetricPerformanceTesterBasic::addMetric(std::string str)
}
/*virtual*/
void LLMetricPerformanceTesterBasic::analyzePerformance(std::ofstream* os, LLSD* base, LLSD* current)
void LLMetricPerformanceTesterBasic::analyzePerformance(llofstream* os, LLSD* base, LLSD* current)
{
resetCurrentCount() ;
@ -254,14 +254,14 @@ void LLMetricPerformanceTesterBasic::analyzePerformance(std::ofstream* os, LLSD*
}
/*virtual*/
void LLMetricPerformanceTesterBasic::compareTestResults(std::ofstream* os, std::string metric_string, S32 v_base, S32 v_current)
void LLMetricPerformanceTesterBasic::compareTestResults(llofstream* os, std::string metric_string, S32 v_base, S32 v_current)
{
*os << llformat(" ,%s, %d, %d, %d, %.4f\n", metric_string.c_str(), v_base, v_current,
v_current - v_base, (v_base != 0) ? 100.f * v_current / v_base : 0) ;
}
/*virtual*/
void LLMetricPerformanceTesterBasic::compareTestResults(std::ofstream* os, std::string metric_string, F32 v_base, F32 v_current)
void LLMetricPerformanceTesterBasic::compareTestResults(llofstream* os, std::string metric_string, F32 v_base, F32 v_current)
{
*os << llformat(" ,%s, %.4f, %.4f, %.4f, %.4f\n", metric_string.c_str(), v_base, v_current,
v_current - v_base, (fabs(v_base) > 0.0001f) ? 100.f * v_current / v_base : 0.f ) ;
@ -293,7 +293,7 @@ LLMetricPerformanceTesterWithSession::~LLMetricPerformanceTesterWithSession()
}
/*virtual*/
void LLMetricPerformanceTesterWithSession::analyzePerformance(std::ofstream* os, LLSD* base, LLSD* current)
void LLMetricPerformanceTesterWithSession::analyzePerformance(llofstream* os, LLSD* base, LLSD* current)
{
// Load the base session
resetCurrentCount() ;

View File

@ -60,7 +60,7 @@ public:
* By default, compares the test results against the baseline one by one, item by item,
* in the increasing order of the LLSD record counter, starting from the first one.
*/
virtual void analyzePerformance(std::ofstream* os, LLSD* base, LLSD* current) ;
virtual void analyzePerformance(llofstream* os, LLSD* base, LLSD* current) ;
static void doAnalysisMetrics(std::string baseline, std::string target, std::string output) ;
@ -93,8 +93,8 @@ protected:
* @param[in] v_base - Base value of the metric.
* @param[in] v_current - Current value of the metric.
*/
virtual void compareTestResults(std::ofstream* os, std::string metric_string, S32 v_base, S32 v_current) ;
virtual void compareTestResults(std::ofstream* os, std::string metric_string, F32 v_base, F32 v_current) ;
virtual void compareTestResults(llofstream* os, std::string metric_string, S32 v_base, S32 v_current) ;
virtual void compareTestResults(llofstream* os, std::string metric_string, F32 v_base, F32 v_current) ;
/**
* @brief Reset internal record count. Count starts with 1.
@ -181,7 +181,7 @@ public:
* This will be loading the base and current sessions and compare them using the virtual
* abstract methods loadTestSession() and compareTestSessions()
*/
virtual void analyzePerformance(std::ofstream* os, LLSD* base, LLSD* current) ;
virtual void analyzePerformance(llofstream* os, LLSD* base, LLSD* current) ;
protected:
/**
@ -205,7 +205,7 @@ protected:
* @brief Compare the base session and the target session. Assumes base and current sessions have been loaded.
* @param[out] os - The comparison result as a standard stream
*/
virtual void compareTestSessions(std::ofstream* os) = 0;
virtual void compareTestSessions(llofstream* os) = 0;
LLTestSession* mBaseSessionp;
LLTestSession* mCurrentSessionp;

View File

@ -1453,7 +1453,7 @@ void LLImageRaw::copyScaled( LLImageRaw* src )
bool LLImageRaw::scale( S32 new_width, S32 new_height, bool scale_image_data )
{
S32 components = getComponents();
if (! ((1 == components) || (3 == components) || (4 == components) ))
if (components != 1 && components != 3 && components != 4)
{
LL_WARNS() << "Invalid getComponents value (" << components << ")" << LL_ENDL;
return false;
@ -1529,6 +1529,55 @@ bool LLImageRaw::scale( S32 new_width, S32 new_height, bool scale_image_data )
return true ;
}
LLPointer<LLImageRaw> LLImageRaw::scaled(S32 new_width, S32 new_height)
{
LLPointer<LLImageRaw> result;
S32 components = getComponents();
if (components != 1 && components != 3 && components != 4)
{
LL_WARNS() << "Invalid getComponents value (" << components << ")" << LL_ENDL;
return result;
}
if (isBufferInvalid())
{
LL_WARNS() << "Invalid image buffer" << LL_ENDL;
return result;
}
S32 old_width = getWidth();
S32 old_height = getHeight();
if ((old_width == new_width) && (old_height == new_height))
{
result = new LLImageRaw(old_width, old_height, components);
if (!result)
{
LL_WARNS() << "Failed to allocate new image" << LL_ENDL;
return result;
}
memcpy(result->getData(), getData(), getDataSize());
}
else
{
S32 new_data_size = new_width * new_height * components;
if (new_data_size > 0)
{
result = new LLImageRaw(new_width, new_height, components);
if (!result)
{
LL_WARNS() << "Failed to allocate new image" << LL_ENDL;
return result;
}
bilinear_scale(getData(), old_width, old_height, components, old_width*components, result->getData(), new_width, new_height, components, new_width*components);
}
}
return result;
}
void LLImageRaw::copyLineScaled( U8* in, U8* out, S32 in_pixel_len, S32 out_pixel_len, S32 in_pixel_step, S32 out_pixel_step )
{
const S32 components = getComponents();
@ -1802,10 +1851,13 @@ static std::string find_file(std::string &name, S8 *codec)
#endif
EImageCodec LLImageBase::getCodecFromExtension(const std::string& exten)
{
for (int i=0; i<(int)(NUM_FILE_EXTENSIONS); i++)
if (!exten.empty())
{
if (exten == file_extensions[i].exten)
return file_extensions[i].codec;
for (int i = 0; i < (int)(NUM_FILE_EXTENSIONS); i++)
{
if (exten == file_extensions[i].exten)
return file_extensions[i].codec;
}
}
return IMG_CODEC_INVALID;
}

View File

@ -222,7 +222,8 @@ public:
void expandToPowerOfTwo(S32 max_dim = MAX_IMAGE_SIZE, bool scale_image = true);
void contractToPowerOfTwo(S32 max_dim = MAX_IMAGE_SIZE, bool scale_image = true);
void biasedScaleToPowerOfTwo(S32 max_dim = MAX_IMAGE_SIZE);
bool scale( S32 new_width, S32 new_height, bool scale_image = true );
bool scale(S32 new_width, S32 new_height, bool scale_image = true);
LLPointer<LLImageRaw> scaled(S32 new_width, S32 new_height);
// Fill the buffer with a constant color
void fill( const LLColor4U& color );

View File

@ -5381,19 +5381,31 @@ void LLVolumeFace::cacheOptimize()
S32 num_verts = mNumVertices;
S32 size = ((num_verts*sizeof(LLVector2)) + 0xF) & ~0xF;
LLVector4a* pos = (LLVector4a*) ll_aligned_malloc<64>(sizeof(LLVector4a)*2*num_verts+size);
if (pos == NULL)
{
LL_ERRS("LLVOLUME") << "Allocation of positions vector[" << sizeof(LLVector4a) * 2 * num_verts + size << "] failed. " << LL_ENDL;
}
LLVector4a* norm = pos + num_verts;
LLVector2* tc = (LLVector2*) (norm + num_verts);
LLVector4a* wght = NULL;
if (mWeights)
{
wght = (LLVector4a*) ll_aligned_malloc_16(sizeof(LLVector4a)*num_verts);
wght = (LLVector4a*)ll_aligned_malloc_16(sizeof(LLVector4a)*num_verts);
if (wght == NULL)
{
LL_ERRS("LLVOLUME") << "Allocation of weights[" << sizeof(LLVector4a) * num_verts << "] failed" << LL_ENDL;
}
}
LLVector4a* binorm = NULL;
if (mTangents)
{
binorm = (LLVector4a*) ll_aligned_malloc_16(sizeof(LLVector4a)*num_verts);
if (binorm == NULL)
{
LL_ERRS("LLVOLUME") << "Allocation of binormals[" << sizeof(LLVector4a)*num_verts << "] failed" << LL_ENDL;
}
}
//allocate mapping of old indices to new indices

View File

@ -65,7 +65,7 @@ static const std::string HEADLESS_VENDOR_STRING("Linden Lab");
static const std::string HEADLESS_RENDERER_STRING("Headless");
static const std::string HEADLESS_VERSION_STRING("1.0");
std::ofstream gFailLog;
llofstream gFailLog;
#if GL_ARB_debug_output

View File

@ -47,7 +47,7 @@
extern BOOL gDebugGL;
extern BOOL gDebugSession;
extern std::ofstream gFailLog;
extern llofstream gFailLog;
#define LL_GL_ERRS LL_ERRS("RenderState")

View File

@ -2297,7 +2297,7 @@
<key>FramePerSecondLimit</key>
<map>
<key>Comment</key>
<string>Test</string>
<string>Controls upper limit of frames per second</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>

View File

@ -3640,6 +3640,7 @@ void appearance_mgr_update_dirty_state()
void update_base_outfit_after_ordering()
{
LLAppearanceMgr& app_mgr = LLAppearanceMgr::instance();
app_mgr.setOutfitImage(LLUUID());
LLInventoryModel::cat_array_t sub_cat_array;
LLInventoryModel::item_array_t outfit_item_array;
gInventory.collectDescendents(app_mgr.getBaseOutfitUUID(),

View File

@ -715,7 +715,7 @@ public:
void run()
{
std::ofstream os(mFile.c_str());
llofstream os(mFile.c_str());
while (!LLAppViewer::instance()->isQuitting())
{
@ -4486,7 +4486,7 @@ void getFileList()
if ( ( iter->length() > 30 ) && (iter->rfind(".dmp") == (iter->length()-4) ) )
{
std::string fullname = pathname + *iter;
std::ifstream fdat( fullname.c_str(), std::ifstream::binary);
llifstream fdat( fullname.c_str(), std::ifstream::binary);
if (fdat)
{
char buf[5];

View File

@ -781,10 +781,10 @@ void LLAppViewerWin32::initCrashReporting(bool reportFreeze)
PROCESS_INFORMATION processInfo;
std::wstring exe_wstr;
exe_wstr=wstringize(exe_path);
exe_wstr = utf8str_to_utf16str(exe_path);
std::wstring arg_wstr;
arg_wstr=wstringize(arg_str);
arg_wstr = utf8str_to_utf16str(arg_str);
LL_INFOS("CrashReport") << "Creating crash reporter process " << exe_path << " with params: " << arg_str << LL_ENDL;
if(CreateProcess(exe_wstr.c_str(),

View File

@ -519,7 +519,7 @@ void LLFastTimerView::exportCharts(const std::string& base, const std::string& t
{ //read base log into memory
S32 i = 0;
std::ifstream is(base.c_str());
llifstream is(base.c_str());
while (!is.eof() && LLSDParser::PARSE_FAILURE != LLSDSerialize::fromXML(cur, is))
{
base_data[i++] = cur;
@ -532,7 +532,7 @@ void LLFastTimerView::exportCharts(const std::string& base, const std::string& t
{ //read current log into memory
S32 i = 0;
std::ifstream is(target.c_str());
llifstream is(target.c_str());
while (!is.eof() && LLSDParser::PARSE_FAILURE != LLSDSerialize::fromXML(cur, is))
{
cur_data[i++] = cur;
@ -877,8 +877,8 @@ LLSD LLFastTimerView::analyzePerformanceLogDefault(std::istream& is)
void LLFastTimerView::doAnalysisDefault(std::string baseline, std::string target, std::string output)
{
// Open baseline and current target, exit if one is inexistent
std::ifstream base_is(baseline.c_str());
std::ifstream target_is(target.c_str());
llifstream base_is(baseline.c_str());
llifstream target_is(target.c_str());
if (!base_is.is_open() || !target_is.is_open())
{
LL_WARNS() << "'-analyzeperformance' error : baseline or current target file inexistent" << LL_ENDL;
@ -896,7 +896,7 @@ void LLFastTimerView::doAnalysisDefault(std::string baseline, std::string target
target_is.close();
//output comparison
std::ofstream os(output.c_str());
llofstream os(output.c_str());
LLSD::Real session_time = current["SessionTime"].asReal();
os <<

View File

@ -687,6 +687,18 @@ void LLFloaterAvatarPicker::find()
std::string text = getChild<LLUICtrl>("Edit")->getValue().asString();
size_t separator_index = text.find_first_of(" ._");
if (separator_index != text.npos)
{
std::string first = text.substr(0, separator_index);
std::string last = text.substr(separator_index+1, text.npos);
LLStringUtil::trim(last);
if("Resident" == last)
{
text = first;
}
}
mQueryID.generate();
std::string url;
@ -954,12 +966,13 @@ void LLFloaterAvatarPicker::processResponse(const LLUUID& query_id, const LLSD&
if (search_results->isEmpty())
{
LLStringUtil::format_map_t map;
map["[TEXT]"] = getChild<LLUICtrl>("Edit")->getValue().asString();
std::string name = "'" + getChild<LLUICtrl>("Edit")->getValue().asString() + "'";
LLSD item;
item["id"] = LLUUID::null;
item["columns"][0]["column"] = "name";
item["columns"][0]["value"] = getString("not_found", map);
item["columns"][0]["value"] = name;
item["columns"][1]["column"] = "username";
item["columns"][1]["value"] = getString("not_found_text");
search_results->addElement(item);
search_results->setEnabled(false);
getChildView("ok_btn")->setEnabled(false);

View File

@ -269,8 +269,8 @@ std::string LLInvFVBridge::getSearchableUUIDString() const
const LLInventoryModel* model = getInventoryModel();
if (model)
{
const LLInventoryItem *item = model->getItem(mUUID);
if(item)
const LLViewerInventoryItem *item = model->getItem(mUUID);
if(item /*&& (item->getIsFullPerm() || gAgent.isGodlikeWithoutAdminMenuFakery())*/) // Keep it FS-legacy style since we had it like this for ages
{
std::string uuid = item->getAssetUUID().asString();
LLStringUtil::toUpper(uuid);

View File

@ -2429,7 +2429,8 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root
{
// <FS:Ansariel> Undo delete item confirmation per-session annoyance
//static bool sDisplayedAtSession = false;
const LLUUID &marketplacelistings_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS, false);
bool marketplacelistings_item = false;
LLAllDescendentsPassedFilter f;
for (std::set<LLFolderViewItem*>::iterator it = selected_items.begin(); (it != selected_items.end()) && (f.allDescendentsPassedFilter()); ++it)
{
@ -2437,9 +2438,15 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root
{
folder->applyFunctorRecursively(f);
}
LLFolderViewModelItemInventory * viewModel = dynamic_cast<LLFolderViewModelItemInventory *>((*it)->getViewModelItem());
if (viewModel && gInventory.isObjectDescendentOf(viewModel->getUUID(), marketplacelistings_id))
{
marketplacelistings_item = true;
break;
}
}
// Fall through to the generic confirmation if the user choose to ignore the specialized one
if ( (!f.allDescendentsPassedFilter()) && (!LLNotifications::instance().getIgnored("DeleteFilteredItems")) )
if ( (!f.allDescendentsPassedFilter()) && !marketplacelistings_item && (!LLNotifications::instance().getIgnored("DeleteFilteredItems")) )
{
LLNotificationsUtil::add("DeleteFilteredItems", LLSD(), LLSD(), boost::bind(&LLInventoryAction::onItemsRemovalConfirmation, _1, _2, root->getHandle()));
}

View File

@ -2070,14 +2070,14 @@ void dump_llsd_to_file(const LLSD& content, std::string filename)
{
if (gSavedSettings.getBOOL("MeshUploadLogXML"))
{
std::ofstream of(filename.c_str());
llofstream of(filename.c_str());
LLSDSerialize::toPrettyXML(content,of);
}
}
LLSD llsd_from_file(std::string filename)
{
std::ifstream ifs(filename.c_str());
llifstream ifs(filename.c_str());
LLSD result;
LLSDSerialize::fromXML(result,ifs);
return result;

View File

@ -2126,7 +2126,7 @@ void LLPanelObject::sendPosition(BOOL btn_down)
if (mObject->isRootEdit())
{
// only offset by parent's translation
mObject->resetChildrenPosition(LLVector3(-delta), TRUE) ;
mObject->resetChildrenPosition(LLVector3(-delta), TRUE, TRUE) ;
}
if(!btn_down)

View File

@ -1702,7 +1702,7 @@ void LLScriptEdCore::onBtnLoadFromFile( void* data )
std::string filename = file_picker.getFirstFile();
std::ifstream fin(filename.c_str());
llifstream fin(filename.c_str());
std::string line;
std::string text;
@ -1740,7 +1740,7 @@ void LLScriptEdCore::onBtnSaveToFile( void* userdata )
{
std::string filename = file_picker.getFirstFile();
std::string scriptText=self->mEditor->getText();
std::ofstream fout(filename.c_str());
llofstream fout(filename.c_str());
fout<<(scriptText);
fout.close();
// <FS:Ansariel> FIRE-7514: Script in external editor needs to be saved twice

View File

@ -532,7 +532,7 @@ void LLSceneMonitor::dumpToFile(std::string file_name)
LL_INFOS("SceneMonitor") << "Saving scene load stats to " << file_name << LL_ENDL;
std::ofstream os(file_name.c_str());
llofstream os(file_name.c_str());
os << std::setprecision(10);

View File

@ -2029,15 +2029,13 @@ bool LLTextureCache::writeToFastCache(S32 id, LLPointer<LLImageRaw> raw, S32 dis
if(w * h *c > 0) //valid
{
//make a duplicate to keep the original raw image untouched.
raw = raw->duplicate();
raw = raw->scaled(w, h);
if (raw->isBufferInvalid())
{
LL_WARNS() << "Invalid image duplicate buffer" << LL_ENDL;
return false;
}
raw->scale(w, h) ;
discardlevel += i ;
}
}

View File

@ -122,7 +122,7 @@ BOOL LLToolPie::handleMouseDown(S32 x, S32 y, MASK mask)
mMouseDownY = y;
//left mouse down always picks transparent (but see handleMouseUp)
mPick = gViewerWindow->pickImmediate(x, y, FALSE, FALSE);
mPick = gViewerWindow->pickImmediate(x, y, TRUE, FALSE);
mPick.mKeyMask = mask;
mMouseButtonDown = true;

View File

@ -6321,7 +6321,7 @@ void LLViewerObject::resetChildrenRotationAndPosition(const std::vector<LLQuater
}
//counter-translation
void LLViewerObject::resetChildrenPosition(const LLVector3& offset, BOOL simplified)
void LLViewerObject::resetChildrenPosition(const LLVector3& offset, BOOL simplified, BOOL skip_avatar_child)
{
if(mChildList.empty())
{
@ -6351,6 +6351,7 @@ void LLViewerObject::resetChildrenPosition(const LLVector3& offset, BOOL simplif
iter != mChildList.end(); iter++)
{
LLViewerObject* childp = *iter;
if (!childp->isSelected() && childp->mDrawable.notNull())
{
if (childp->getPCode() != LL_PCODE_LEGACY_AVATAR)
@ -6360,14 +6361,16 @@ void LLViewerObject::resetChildrenPosition(const LLVector3& offset, BOOL simplif
}
else //avatar
{
LLVector3 reset_pos = ((LLVOAvatar*)childp)->mDrawable->mXform.getPosition() + child_offset ;
if(!skip_avatar_child)
{
LLVector3 reset_pos = ((LLVOAvatar*)childp)->mDrawable->mXform.getPosition() + child_offset ;
((LLVOAvatar*)childp)->mDrawable->mXform.setPosition(reset_pos);
((LLVOAvatar*)childp)->mDrawable->getVObj()->setPosition(reset_pos);
LLManip::rebuild(childp);
}
}
((LLVOAvatar*)childp)->mDrawable->mXform.setPosition(reset_pos);
((LLVOAvatar*)childp)->mDrawable->getVObj()->setPosition(reset_pos);
LLManip::rebuild(childp);
}
}
}
}
return ;

View File

@ -589,7 +589,7 @@ public:
public:
//counter-translation
void resetChildrenPosition(const LLVector3& offset, BOOL simplified = FALSE) ;
void resetChildrenPosition(const LLVector3& offset, BOOL simplified = FALSE, BOOL skip_avatar_child = FALSE) ;
//counter-rotation
void resetChildrenRotationAndPosition(const std::vector<LLQuaternion>& rotations,
const std::vector<LLVector3>& positions) ;

View File

@ -1471,8 +1471,7 @@ void LLViewerFetchedTexture::addToCreateTexture()
{
//make a duplicate in case somebody else is using this raw image
mRawImage = mRawImage->duplicate();
mRawImage->scale(w >> i, h >> i) ;
mRawImage = mRawImage->scaled(w >> i, h >> i);
}
}
}
@ -3058,8 +3057,7 @@ void LLViewerFetchedTexture::setCachedRawImage()
{
//make a duplicate in case somebody else is using this raw image
mRawImage = mRawImage->duplicate();
mRawImage->scale(w >> i, h >> i) ;
mRawImage = mRawImage->scaled(w >> i, h >> i);
}
}
mCachedRawImage = mRawImage;
@ -4111,7 +4109,7 @@ void LLTexturePipelineTester::updateStablizingTime()
}
//virtual
void LLTexturePipelineTester::compareTestSessions(std::ofstream* os)
void LLTexturePipelineTester::compareTestSessions(llofstream* os)
{
LLTexturePipelineTester::LLTextureTestSession* base_sessionp = dynamic_cast<LLTexturePipelineTester::LLTextureTestSession*>(mBaseSessionp);
LLTexturePipelineTester::LLTextureTestSession* current_sessionp = dynamic_cast<LLTexturePipelineTester::LLTextureTestSession*>(mCurrentSessionp);

View File

@ -821,7 +821,7 @@ private:
};
/*virtual*/ LLMetricPerformanceTesterWithSession::LLTestSession* loadTestSession(LLSD* log) ;
/*virtual*/ void compareTestSessions(std::ofstream* os) ;
/*virtual*/ void compareTestSessions(llofstream* os) ;
};
#endif

View File

@ -5879,13 +5879,13 @@ void LLVOAvatar::resetAnimations()
// Override selectively based on avatar sex and whether we're using new
// animations.
LLUUID LLVOAvatar::remapMotionID(const LLUUID& id, ESex gender)
LLUUID LLVOAvatar::remapMotionID(const LLUUID& id)
{
static LLCachedControl<bool> use_new_walk_run(gSavedSettings, "UseNewWalkRun");
LLUUID result = id;
// start special case female walk for female avatars
if (gender == SEX_FEMALE)
if (getSex() == SEX_FEMALE)
{
if (id == ANIM_AGENT_WALK)
{
@ -5901,10 +5901,6 @@ LLUUID LLVOAvatar::remapMotionID(const LLUUID& id, ESex gender)
if (use_new_walk_run)
result = ANIM_AGENT_FEMALE_RUN_NEW;
}
else if (id == ANIM_AGENT_SIT)
{
result = ANIM_AGENT_SIT_FEMALE;
}
}
else
{
@ -5943,7 +5939,7 @@ BOOL LLVOAvatar::startMotion(const LLUUID& id, F32 time_offset)
remap_id = AOEngine::getInstance()->override(id, TRUE);
if (remap_id.isNull())
{
remap_id = remapMotionID(id, getSex());
remap_id = remapMotionID(id);
}
else
{
@ -5952,7 +5948,7 @@ BOOL LLVOAvatar::startMotion(const LLUUID& id, F32 time_offset)
}
else
{
remap_id = remapMotionID(id, getSex());
remap_id = remapMotionID(id);
}
// </FS:Zi> Animation Overrider
@ -5977,24 +5973,14 @@ BOOL LLVOAvatar::stopMotion(const LLUUID& id, BOOL stop_immediate)
LL_DEBUGS() << "motion requested " << id.asString() << " " << gAnimLibrary.animationName(id) << LL_ENDL;
// <FS:Zi> Animation Overrider
//LLUUID remap_id = remapMotionID(id, getSex());
//if (findMotion(remap_id) == NULL)
//{
// //possibility of encountering animation from the previous gender
// remap_id = remapMotionID(id, (getSex() == SEX_MALE) ? SEX_FEMALE : SEX_MALE);
//}
//LLUUID remap_id = remapMotionID(id);
LLUUID remap_id;
if (isSelf())
{
remap_id = AOEngine::getInstance()->override(id, FALSE);
if (remap_id.isNull())
{
remap_id = remapMotionID(id, getSex());
if (findMotion(remap_id) == NULL)
{
//possibility of encountering animation from the previous gender
remap_id = remapMotionID(id, (getSex() == SEX_MALE) ? SEX_FEMALE : SEX_MALE);
}
remap_id = remapMotionID(id);
}
else
{
@ -6003,15 +5989,10 @@ BOOL LLVOAvatar::stopMotion(const LLUUID& id, BOOL stop_immediate)
}
else
{
remap_id = remapMotionID(id, getSex());
if (findMotion(remap_id) == NULL)
{
//possibility of encountering animation from the previous gender
remap_id = remapMotionID(id, (getSex() == SEX_MALE) ? SEX_FEMALE : SEX_MALE);
}
remap_id = remapMotionID(id);
}
// </FS:Zi> Animation Overrider
if (remap_id != id)
{
LL_DEBUGS() << "motion resultant " << remap_id.asString() << " " << gAnimLibrary.animationName(remap_id) << LL_ENDL;
@ -9319,7 +9300,7 @@ void dump_sequential_xml(const std::string outprefix, const LLSD& content)
{
std::string outfilename = get_sequential_numbered_file_name(outprefix,".xml");
std::string fullpath = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,outfilename);
std::ofstream ofs(fullpath.c_str(), std::ios_base::out);
llofstream ofs(fullpath.c_str(), std::ios_base::out);
ofs << LLSDOStreamer<LLSDXMLFormatter>(content, LLSDFormatter::OPTIONS_PRETTY);
LL_DEBUGS("Avatar") << "results saved to: " << fullpath << LL_ENDL;
}

View File

@ -189,7 +189,7 @@ public:
/*virtual*/ LLVector3 getCharacterVelocity();
/*virtual*/ LLVector3 getCharacterAngularVelocity();
/*virtual*/ LLUUID remapMotionID(const LLUUID& id, ESex gender);
/*virtual*/ LLUUID remapMotionID(const LLUUID& id);
/*virtual*/ BOOL startMotion(const LLUUID& id, F32 time_offset = 0.f);
/*virtual*/ BOOL stopMotion(const LLUUID& id, BOOL stop_immediate = FALSE);
virtual bool hasMotionFromSource(const LLUUID& source_id);

View File

@ -16,6 +16,10 @@
name="not_found">
&apos;[TEXT]&apos; not found
</floater.string>
<floater.string
name="not_found_text">
Resident wasn't found.
</floater.string>
<floater.string
name="no_one_near">
No one near

View File

@ -6,7 +6,7 @@
<text name="Cache:">
キャッシュ:
</text>
<spinner label="キャッシュサイズ(649,984MB" name="cachesizespinner"/>
<spinner label="キャッシュサイズ(2569,984MB" name="cachesizespinner"/>
<text name="text_box5">
MB
</text>

View File

@ -6,7 +6,7 @@
<text name="Cache:">
Cache:
</text>
<spinner label="Cache (64 - 9984 MB)" name="cachesizespinner"/>
<spinner label="Cache (256 - 9984 MB)" name="cachesizespinner"/>
<text name="text_box5">
MB
</text>

View File

@ -6,7 +6,7 @@
<text name="Cache:">
Önbellek:
</text>
<spinner label="Önbellek boyutu (64-9984 MB)" name="cachesizespinner"/>
<spinner label="Önbellek boyutu (256-9984 MB)" name="cachesizespinner"/>
<text name="text_box5">
MB
</text>

View File

@ -6,7 +6,7 @@
<text name="Cache:">
快取:
</text>
<spinner label="快取大小 (64 - 9984MB)" name="cachesizespinner"/>
<spinner label="快取大小 (256 - 9984MB)" name="cachesizespinner"/>
<text name="text_box5">
MB
</text>

View File

@ -141,7 +141,7 @@ public:
private:
NamedTempFile mTempFile;
std::ofstream mFile;
llofstream mFile;
};
class LLReplayLogReal: public LLReplayLog, public boost::noncopyable
@ -582,7 +582,7 @@ int main(int argc, char **argv)
apr_status_t apr_err;
const char* opt_arg = NULL;
int opt_id = 0;
boost::scoped_ptr<std::ofstream> output;
boost::scoped_ptr<llofstream> output;
const char *touch = NULL;
while(true)
@ -612,7 +612,7 @@ int main(int argc, char **argv)
verbose_mode = true;
break;
case 'o':
output.reset(new std::ofstream);
output.reset(new llofstream);
output->open(opt_arg);
break;
case 's': // --sourcedir
@ -686,7 +686,7 @@ int main(int argc, char **argv)
if (touch && success)
{
std::ofstream s;
llofstream s;
s.open(touch);
s << "ok" << std::endl;
s.close();

View File

@ -417,7 +417,7 @@ bool LLCrashLoggerWindows::initCrashServer()
std::wstring wpipe_name;
wpipe_name = mCrashReportPipeStr + std::wstring(wstringize(mPID));
std::wstring wdump_path( wstringize(dump_path) );
std::wstring wdump_path(utf8str_to_utf16str(dump_path));
//Pipe naming conventions: http://msdn.microsoft.com/en-us/library/aa365783%28v=vs.85%29.aspx
mCrashHandler = new CrashGenerationServer( wpipe_name,

View File

@ -29,15 +29,26 @@
#include <stdlib.h>
#include "llcrashloggerwindows.h"
#ifdef _UNICODE
int APIENTRY wWinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPWSTR lpCmdLine,
int nCmdShow)
#else
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
#endif //_UNICODE
{
LL_INFOS() << "Starting crash reporter with args" << &lpCmdLine << LL_ENDL;
LLCrashLoggerWindows app;
app.setHandle(hInstance);
#ifdef _UNICODE
app.parseCommandOptions(__argc, __wargv);
#else
app.parseCommandOptions(__argc, __argv);
#endif //_UNICODE
LLSD options = LLApp::instance()->getOptionData(
LLApp::PRIORITY_COMMAND_LINE);