Merge branch 'master' of https://github.com/highfidelity/hifi into metavoxels

This commit is contained in:
Andrzej Kapolka 2014-06-27 17:53:50 -07:00
commit 4f9cf82335
8 changed files with 14 additions and 13 deletions

View file

@ -3650,8 +3650,9 @@ void Application::stopAllScripts(bool restart) {
} }
void Application::stopScript(const QString &scriptName) { void Application::stopScript(const QString &scriptName) {
if (_scriptEnginesHash.contains(scriptName)) { const QString& scriptURLString = QUrl(scriptName).toString();
_scriptEnginesHash.value(scriptName)->stop(); if (_scriptEnginesHash.contains(scriptURLString)) {
_scriptEnginesHash.value(scriptURLString)->stop();
qDebug() << "stopping script..." << scriptName; qDebug() << "stopping script..." << scriptName;
} }
} }

View file

@ -108,9 +108,9 @@ Menu::Menu() :
_fastFPSAverage(ONE_SECOND_OF_FRAMES), _fastFPSAverage(ONE_SECOND_OF_FRAMES),
_loginAction(NULL), _loginAction(NULL),
_preferencesDialog(NULL), _preferencesDialog(NULL),
_scriptsLocation(),
_loginDialog(NULL), _loginDialog(NULL),
_snapshotsLocation() _snapshotsLocation(),
_scriptsLocation()
{ {
Application *appInstance = Application::getInstance(); Application *appInstance = Application::getInstance();

View file

@ -574,8 +574,8 @@ void Avatar::initializeHair() {
for (int link = 0; link < HAIR_LINKS; link++) { for (int link = 0; link < HAIR_LINKS; link++) {
int vertexIndex = strand * HAIR_LINKS + link; int vertexIndex = strand * HAIR_LINKS + link;
// Clear constraints // Clear constraints
for (int link = 0; link < HAIR_MAX_CONSTRAINTS; link++) { for (int link2 = 0; link2 < HAIR_MAX_CONSTRAINTS; link2++) {
_hairConstraints[vertexIndex * HAIR_MAX_CONSTRAINTS + link] = -1; _hairConstraints[vertexIndex * HAIR_MAX_CONSTRAINTS + link2] = -1;
} }
if (vertexIndex % HAIR_LINKS == 0) { if (vertexIndex % HAIR_LINKS == 0) {
// start of strand // start of strand

View file

@ -376,7 +376,7 @@ void ApplicationOverlay::renderControllerPointers() {
//then disable it. //then disable it.
const int MAX_BUTTON_PRESS_TIME = 250 * MSECS_TO_USECS; const int MAX_BUTTON_PRESS_TIME = 250 * MSECS_TO_USECS;
if (usecTimestampNow() - pressedTime[index] < MAX_BUTTON_PRESS_TIME) { if (usecTimestampNow() < pressedTime[index] + MAX_BUTTON_PRESS_TIME) {
_magActive[index] = !stateWhenPressed[index]; _magActive[index] = !stateWhenPressed[index];
} }
} }

View file

@ -28,8 +28,8 @@ RunningScriptsWidget::RunningScriptsWidget(QWidget* parent) :
FramelessDialog(parent, 0, POSITION_LEFT), FramelessDialog(parent, 0, POSITION_LEFT),
ui(new Ui::RunningScriptsWidget), ui(new Ui::RunningScriptsWidget),
_signalMapper(this), _signalMapper(this),
_scriptsModel(this), _proxyModel(this),
_proxyModel(this) { _scriptsModel(this) {
ui->setupUi(this); ui->setupUi(this);
setAttribute(Qt::WA_DeleteOnClose, false); setAttribute(Qt::WA_DeleteOnClose, false);

View file

@ -902,7 +902,7 @@ padding: 10px;margin-top:10px</string>
</widget> </widget>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_11"> <layout class="QHBoxLayout" name="horizontalLayout_111">
<property name="spacing"> <property name="spacing">
<number>0</number> <number>0</number>
</property> </property>
@ -937,7 +937,7 @@ padding: 10px;margin-top:10px</string>
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="horizontalSpacer_11"> <spacer name="horizontalSpacer_111">
<property name="font"> <property name="font">
<font> <font>
<family>Arial</family> <family>Arial</family>

View file

@ -121,7 +121,7 @@ qint64 AudioRingBuffer::writeData(const char* data, qint64 maxSize) {
// make sure we have enough bytes left for this to be the right amount of audio // make sure we have enough bytes left for this to be the right amount of audio
// otherwise we should not copy that data, and leave the buffer pointers where they are // otherwise we should not copy that data, and leave the buffer pointers where they are
int samplesToCopy = std::min((quint64)(maxSize / sizeof(int16_t)), (quint64)_sampleCapacity); quint64 samplesToCopy = std::min((quint64)(maxSize / sizeof(int16_t)), (quint64)_sampleCapacity);
if (_hasStarted && samplesToCopy > _sampleCapacity - samplesAvailable()) { if (_hasStarted && samplesToCopy > _sampleCapacity - samplesAvailable()) {
// this read will cross the next output, so call us starved and reset the buffer // this read will cross the next output, so call us starved and reset the buffer

View file

@ -209,7 +209,7 @@ bool PositionalAudioRingBuffer::shouldBeAddedToMix() {
} }
return false; return false;
} else if (samplesAvailable() < samplesPerFrame) { } else if (samplesAvailable() < (unsigned int)samplesPerFrame) {
// if the buffer doesn't have a full frame of samples to take for mixing, it is starved // if the buffer doesn't have a full frame of samples to take for mixing, it is starved
_isStarved = true; _isStarved = true;