| 37 | } |
| 38 | |
| 39 | void NativeLoadingText::AddLine(const char* msg) { |
| 40 | buf_mutex.lock(); |
| 41 | // Shift all lines up |
| 42 | for (int i = kMaxLines * kMaxCharPerLine - 1, index = (kMaxLines - 1) * kMaxCharPerLine - 1; |
| 43 | i >= kMaxCharPerLine;) { |
| 44 | buf[i--] = buf[index--]; |
| 45 | } |
| 46 | // Add new line |
| 47 | snprintf(buf, kMaxCharPerLine, "%s", msg); |
| 48 | buf_mutex.unlock(); |
| 49 | } |
| 50 | |
| 51 | void NativeLoadingText::Clear() { |
| 52 | buf_mutex.lock(); |
no test coverage detected