am dd4d938e: assert when the touch event goes back to the future
* commit 'dd4d938e6990701176c658af5c593ea377973bef': assert when the touch event goes back to the futuremain
commit
6b25917079
|
@ -93,6 +93,7 @@ static AK_FORCE_INLINE void dumpWord(const int *word, const int length) {
|
||||||
#include <execinfo.h>
|
#include <execinfo.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#define DO_ASSERT_TEST
|
||||||
#define ASSERT(success) do { if (!(success)) { showStackTrace(); assert(success);} } while (0)
|
#define ASSERT(success) do { if (!(success)) { showStackTrace(); assert(success);} } while (0)
|
||||||
#define SHOW_STACK_TRACE do { showStackTrace(); } while (0)
|
#define SHOW_STACK_TRACE do { showStackTrace(); } while (0)
|
||||||
|
|
||||||
|
@ -111,6 +112,7 @@ static inline void showStackTrace() {
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
#define DO_ASSERT_TEST
|
||||||
#define ASSERT(success) assert(success)
|
#define ASSERT(success) assert(success)
|
||||||
#define SHOW_STACK_TRACE
|
#define SHOW_STACK_TRACE
|
||||||
#endif
|
#endif
|
||||||
|
@ -120,6 +122,7 @@ static inline void showStackTrace() {
|
||||||
#define AKLOGI(fmt, ...)
|
#define AKLOGI(fmt, ...)
|
||||||
#define DUMP_RESULT(words, frequencies, maxWordCount, maxWordLength)
|
#define DUMP_RESULT(words, frequencies, maxWordCount, maxWordLength)
|
||||||
#define DUMP_WORD(word, length)
|
#define DUMP_WORD(word, length)
|
||||||
|
#undef DO_ASSERT_TEST
|
||||||
#define ASSERT(success)
|
#define ASSERT(success)
|
||||||
#define SHOW_STACK_TRACE
|
#define SHOW_STACK_TRACE
|
||||||
#define INTS_TO_CHARS(input, length, output)
|
#define INTS_TO_CHARS(input, length, output)
|
||||||
|
|
|
@ -123,6 +123,15 @@ void ProximityInfoState::initInputParams(const int pointerId, const float maxPoi
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#ifdef DO_ASSERT_TEST
|
||||||
|
if (times) {
|
||||||
|
for (int i = 0; i < inputSize; ++i) {
|
||||||
|
if (i > 0) {
|
||||||
|
ASSERT(times[i] >= times[i - 1]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
const bool proximityOnly = !isGeometric && (xCoordinates[0] < 0 || yCoordinates[0] < 0);
|
const bool proximityOnly = !isGeometric && (xCoordinates[0] < 0 || yCoordinates[0] < 0);
|
||||||
int lastInputIndex = pushTouchPointStartIndex;
|
int lastInputIndex = pushTouchPointStartIndex;
|
||||||
for (int i = lastInputIndex; i < inputSize; ++i) {
|
for (int i = lastInputIndex; i < inputSize; ++i) {
|
||||||
|
|
Loading…
Reference in New Issue