Skip to content

Commit

Permalink
IanniX 0.9.12
Browse files Browse the repository at this point in the history
- bug with multiple instantaneous trigs of one trigger
  • Loading branch information
gjacquemin committed Aug 13, 2013
1 parent 5616faa commit 2463e5c
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 17 deletions.
Binary file modified .DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion IanniX.pro.user
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 2.7.1, 2013-08-13T08:20:34. -->
<!-- Written by QtCreator 2.7.1, 2013-08-13T13:10:17. -->
<qtcreator>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
Expand Down
2 changes: 1 addition & 1 deletion Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,6 @@
<key>CFBundleSignature</key>
<string>INNX</string>
<key>CFBundleVersion</key>
<string>0.9.11</string>
<string>0.9.12</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion iannixapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ int main(int argc, char *argv[]) {
//iannixApp.installTranslator(&translator);

QString appName = "IanniX ";
QString appVersion = "0.9.11";
QString appVersion = "0.9.12";

#ifdef Q_OS_MAC
appName += "Mac";
Expand Down
8 changes: 4 additions & 4 deletions icon.rc
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
IDI_ICON1 ICON DISCARDABLE "icon.ico"

#include <windows.h>
#define VER_FILEVERSION 0,9,11,0
#define VER_FILEVERSION_STR "0.9,11\0"
#define VER_PRODUCTVERSION 0,9,11,0
#define VER_PRODUCTVERSION_STR "0.9,11\0"
#define VER_FILEVERSION 0,9,12,0
#define VER_FILEVERSION_STR "0.9,12\0"
#define VER_PRODUCTVERSION 0,9,12,0
#define VER_PRODUCTVERSION_STR "0.9,12\0"
#define VER_COMPANYNAME_STR "IanniX Association"
#define VER_FILEDESCRIPTION_STR "IanniX"
#define VER_INTERNALNAME_STR "IanniX"
Expand Down
8 changes: 3 additions & 5 deletions objects/nxcursor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ void NxCursor::trig(bool force) {

bool NxCursor::contains(NxTrigger *trigger) const {
qint64 timestamp = QDateTime::currentMSecsSinceEpoch();
if((previousPreviousCursorReliable) && (trigger->getActive()) && ((timestamp - trigger->lastTrigTime) > 10)) {
if((previousPreviousCursorReliable) && (trigger->getActive()) && (!trigger->cursorTrigged)/* && ((timestamp - trigger->lastTrigTime) > 0)*/) {
NxPoint centre1 = trigger->getPos() - NxPoint( (cursorPoly.at(0).x() + cursorPoly.at(1).x() + cursorPoly.at(2).x() + cursorPoly.at(3).x()) / 4.,
(cursorPoly.at(0).y() + cursorPoly.at(1).y() + cursorPoly.at(2).y() + cursorPoly.at(3).y()) / 4.,
(cursorPoly.at(0).z() + cursorPoly.at(1).z() + cursorPoly.at(2).z() + cursorPoly.at(3).z()) / 4.);
Expand Down Expand Up @@ -544,19 +544,17 @@ bool NxCursor::contains(NxTrigger *trigger) const {
bool isInDepth = (qAbs(centre1.z()) <= depth/2.) && (qAbs(centre2.z()) <= depth/2.);
bool isInside = ((centre1.x() >= 0) && (centre2.x() <= 0)) || ((centre1.x() <= 0) && (centre2.x() >= 0));

//qDebug("%d\t=\t%f\t%f", isInside, centre1.x(), centre2.x());

if(depth > 0) {
//qDebug("%d %d %d", isInWidth, isInDepth, isInside);
if(isInDepth && isInWidth && isInside) {
qDebug("A > %f %d %d %d", timeLocal, isInDepth, isInWidth, isInside);
qDebug("%d\t=\t%f\t%f => BY %d", isInside, centre1.x(), centre2.x(), trigger->cursorTrigged);
trigger->lastTrigTime = timestamp;
return true;
}
else
return false;
}
else {
//qDebug("%d %d", isInWidth, isInside);
if(isInWidth && isInside) {
trigger->lastTrigTime = timestamp;
return true;
Expand Down
7 changes: 3 additions & 4 deletions objects/nxtrigger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,15 +149,14 @@ void NxTrigger::paint() {
}

void NxTrigger::trig(NxObject *cursor) {
/*if((!cursor) || (!cursorTrigged)) {*/
if(cursor) {
colorTrigged = cursor->getCurrentColor();
colorTrigged.setAlpha(255);
}
cursorTrigged = cursor;
QTimer::singleShot(qMax(triggerOff*1000, (qreal)80), this, SLOT(trigEnd()));
MessageManager::outgoingMessage(MessageManagerDestination(this, this, cursorTrigged));
//}
if(triggerOff > 0) QTimer::singleShot(triggerOff*1000, this, SLOT(trigEnd()));
else trigEnd();
}
void NxTrigger::trigEnd() {
if(triggerOff > 0) {
Expand All @@ -169,8 +168,8 @@ void NxTrigger::trigEnd() {
sendMessage = true;
}
}
cursorTrigged = 0;
if(sendMessage)
MessageManager::outgoingMessage(MessageManagerDestination(this, this, cursorTriggedTmp));
}
cursorTrigged = 0;
}
2 changes: 1 addition & 1 deletion objects/nxtrigger.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ class NxTrigger : public NxObject {
private:
qreal cacheSize;
QString textureActive, textureInactive;
NxObject *cursorTrigged;
QColor colorTrigged;
qreal triggerOff;
static GLuint glListTrigger;
public:
NxObject *cursorTrigged;
qint64 lastTrigTime;
inline quint8 getType() const {
return ObjectsTypeTrigger;
Expand Down

0 comments on commit 2463e5c

Please sign in to comment.