| e8555c89 Andy McCall |
1 |
#include "StdioMessages.hh" |
| 2 |
|
| 3 |
#include <iostream> |
| 4 |
|
| 5 |
namespace openmsx { |
| 6 |
|
| 7 |
void StdioMessages::log(CliComm::LogLevel level, std::string_view message, float fraction) noexcept |
| 8 |
{ |
| 9 |
auto& out = (level == CliComm::LogLevel::INFO) ? std::cout : std::cerr; |
| 10 |
out << toString(level) << ": " << message; |
| 11 |
if (level == CliComm::LogLevel::PROGRESS && fraction >= 0.0f) { |
| 12 |
out << "... " << int(100.0f * fraction) << '%'; |
| 13 |
} |
| 14 |
out << '\n' << std::flush; |
| 15 |
} |
| 16 |
|
| 17 |
void StdioMessages::update(CliComm::UpdateType , std::string_view , |
| 18 |
std::string_view , std::string_view ) noexcept |
| 19 |
{ |
| 20 |
|
| 21 |
} |
| 22 |
|
| 23 |
} |