| 1563 | } |
| 1564 | |
| 1565 | void refresh(const std::string &file_name, bool needs_terminate) { |
| 1566 | if (needs_terminate) { |
| 1567 | proc.terminate(false, false); |
| 1568 | } |
| 1569 | |
| 1570 | #ifdef _WIN32 |
| 1571 | size_t fail_count = 0; |
| 1572 | while (fail_count < 5 && vDisplayDriverStatus != VDISPLAY::DRIVER_STATUS::OK) { |
| 1573 | initVDisplayDriver(); |
| 1574 | if (vDisplayDriverStatus == VDISPLAY::DRIVER_STATUS::OK) { |
| 1575 | break; |
| 1576 | } |
| 1577 | |
| 1578 | fail_count += 1; |
| 1579 | std::this_thread::sleep_for(1s); |
| 1580 | } |
| 1581 | #endif |
| 1582 | |
| 1583 | auto proc_opt = proc::parse(file_name); |
| 1584 | |
| 1585 | if (proc_opt) { |
| 1586 | proc = std::move(*proc_opt); |
| 1587 | } |
| 1588 | } |
| 1589 | } // namespace proc |
no test coverage detected