| 1418 | } |
| 1419 | |
| 1420 | void MainWindow::console(const QString &str, int type) { |
| 1421 | if (m_nativeConsole) { |
| 1422 | fputs(str.toStdString().c_str(), type == EmuThread::ConsoleErr ? stderr : stdout); |
| 1423 | } else { |
| 1424 | QTextCharFormat format = ui->console->currentCharFormat(); |
| 1425 | if (type == EmuThread::ConsoleNorm) { |
| 1426 | format.setFontWeight(QFont::Normal); |
| 1427 | } else { |
| 1428 | format.setFontWeight(QFont::Black); |
| 1429 | } |
| 1430 | QTextCursor cur(ui->console->document()); |
| 1431 | cur.movePosition(QTextCursor::End); |
| 1432 | cur.insertText(str, format); |
| 1433 | if (ui->checkAutoScroll->isChecked()) { |
| 1434 | ui->console->setTextCursor(cur); |
| 1435 | } |
| 1436 | } |
| 1437 | } |
| 1438 | |
| 1439 | void MainWindow::console(int type, const char *str, int size) { |
| 1440 | if (size == -1) { |
nothing calls this directly
no outgoing calls
no test coverage detected