From 6115125dd2b065d7083357b02665d93d47468285 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 26 Sep 2013 11:20:11 -0700 Subject: BUILDFIX: ll_aligned_free call --- indra/llvfs/llvfile.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/llvfs/llvfile.cpp b/indra/llvfs/llvfile.cpp index 2af7a7d35d..9b57246ea1 100755 --- a/indra/llvfs/llvfile.cpp +++ b/indra/llvfs/llvfile.cpp @@ -137,12 +137,12 @@ U8* LLVFile::readFile(LLVFS *vfs, const LLUUID &uuid, LLAssetType::EType type, S } else { - data = (U8*) ll_aligned_malloc_16(file_size); + data = (U8*) ll_aligned_malloc(16, file_size); file.read(data, file_size); /* Flawfinder: ignore */ if (file.getLastBytesRead() != (S32)file_size) { - ll_aligned_free(data); + ll_aligned_free(16, data); data = NULL; file_size = 0; } -- cgit v1.2.3 From 4db06820f0a89d480a3d5c49c26313a3bb78544d Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 26 Sep 2013 11:34:07 -0700 Subject: fix for display of joystick statbar monitors --- indra/llui/llstatbar.cpp | 12 ++++++------ indra/newview/llfloaterjoystick.cpp | 10 +++++----- indra/newview/skins/default/xui/en/floater_joystick.xml | 5 +++++ 3 files changed, 16 insertions(+), 11 deletions(-) (limited to 'indra') diff --git a/indra/llui/llstatbar.cpp b/indra/llui/llstatbar.cpp index 222db70d2b..4ee10837b6 100755 --- a/indra/llui/llstatbar.cpp +++ b/indra/llui/llstatbar.cpp @@ -62,7 +62,7 @@ F32 calc_tick_value(F32 min, F32 max) { S32 divisor = DIVISORS[divisor_idx]; F32 possible_tick_value = range / divisor; - S32 num_whole_digits = llceil(logf(min + possible_tick_value) * OO_LN10); + S32 num_whole_digits = llceil(logf(llabs(min + possible_tick_value)) * OO_LN10); for (S32 digit_count = -(num_whole_digits - 1); digit_count < 6; digit_count++) { F32 test_tick_value = min + (possible_tick_value * pow(10.0, digit_count)); @@ -681,8 +681,8 @@ void LLStatBar::drawTicks( F32 min, F32 max, F32 value_scale, LLRect &bar_rect ) // start counting from actual min, not current, animating min, so that ticks don't float between numbers // ensure ticks always hit 0 - S32 last_tick = 0; - S32 last_label = 0; + S32 last_tick = S32_MIN; + S32 last_label = S32_MIN; if (mTickValue > 0.f && value_scale > 0.f) { const S32 MIN_TICK_SPACING = mOrientation == HORIZONTAL ? 20 : 30; @@ -697,7 +697,7 @@ void LLStatBar::drawTicks( F32 min, F32 max, F32 value_scale, LLRect &bar_rect ) { const S32 begin = llfloor((tick_value - mCurMinBar)*value_scale); const S32 end = begin + TICK_WIDTH; - if (begin - last_tick < MIN_TICK_SPACING) + if (begin < last_tick + MIN_TICK_SPACING) { continue; } @@ -712,7 +712,7 @@ void LLStatBar::drawTicks( F32 min, F32 max, F32 value_scale, LLRect &bar_rect ) if (mOrientation == HORIZONTAL) { - if (begin - last_label > MIN_LABEL_SPACING) + if (begin > last_label + MIN_LABEL_SPACING) { gl_rect_2d(bar_rect.mLeft, end, bar_rect.mRight - TICK_LENGTH, begin, LLColor4(1.f, 1.f, 1.f, 0.25f)); LLFontGL::getFontMonospace()->renderUTF8(tick_string, 0, bar_rect.mRight, begin, @@ -727,7 +727,7 @@ void LLStatBar::drawTicks( F32 min, F32 max, F32 value_scale, LLRect &bar_rect ) } else { - if (begin - last_label > MIN_LABEL_SPACING) + if (begin > last_label + MIN_LABEL_SPACING) { gl_rect_2d(begin, bar_rect.mTop, end, bar_rect.mBottom - TICK_LENGTH, LLColor4(1.f, 1.f, 1.f, 0.25f)); LLFontGL::getFontMonospace()->renderUTF8(tick_string, 0, begin - 1, bar_rect.mBottom - TICK_LENGTH, diff --git a/indra/newview/llfloaterjoystick.cpp b/indra/newview/llfloaterjoystick.cpp index adcecbbb7a..b7fff6cae3 100755 --- a/indra/newview/llfloaterjoystick.cpp +++ b/indra/newview/llfloaterjoystick.cpp @@ -42,20 +42,20 @@ #include "llviewerjoystick.h" #include "llcheckboxctrl.h" -static LLTrace::SampleStatHandle<> sJoystickAxis1("Joystick axis 1"), +static LLTrace::SampleStatHandle<> sJoystickAxis0("Joystick axis 0"), + sJoystickAxis1("Joystick axis 1"), sJoystickAxis2("Joystick axis 2"), sJoystickAxis3("Joystick axis 3"), sJoystickAxis4("Joystick axis 4"), - sJoystickAxis5("Joystick axis 5"), - sJoystickAxis6("Joystick axis 6"); + sJoystickAxis5("Joystick axis 5"); static LLTrace::SampleStatHandle<>* sJoystickAxes[6] = { + &sJoystickAxis0, &sJoystickAxis1, &sJoystickAxis2, &sJoystickAxis3, &sJoystickAxis4, - &sJoystickAxis5, - &sJoystickAxis6 + &sJoystickAxis5 }; LLFloaterJoystick::LLFloaterJoystick(const LLSD& data) diff --git a/indra/newview/skins/default/xui/en/floater_joystick.xml b/indra/newview/skins/default/xui/en/floater_joystick.xml index 59f6a9434c..ca165d1a29 100755 --- a/indra/newview/skins/default/xui/en/floater_joystick.xml +++ b/indra/newview/skins/default/xui/en/floater_joystick.xml @@ -208,6 +208,7 @@