| 1262 | extern void ShowFramerateWindow(); |
| 1263 | |
| 1264 | static bool ConScript(std::span<std::string_view> argv) |
| 1265 | { |
| 1266 | extern std::optional<FileHandle> _iconsole_output_file; |
| 1267 | |
| 1268 | if (argv.empty()) { |
| 1269 | IConsolePrint(CC_HELP, "Start or stop logging console output to a file. Usage: 'script <filename>'."); |
| 1270 | IConsolePrint(CC_HELP, "If filename is omitted, a running log is stopped if it is active."); |
| 1271 | return true; |
| 1272 | } |
| 1273 | |
| 1274 | if (!CloseConsoleLogIfActive()) { |
| 1275 | if (argv.size() < 2) return false; |
| 1276 | |
| 1277 | _iconsole_output_file = FileHandle::Open(argv[1], "ab"); |
| 1278 | if (!_iconsole_output_file.has_value()) { |
| 1279 | IConsolePrint(CC_ERROR, "Could not open console log file '{}'.", argv[1]); |
| 1280 | } else { |
| 1281 | IConsolePrint(CC_INFO, "Console log output started to '{}'.", argv[1]); |
| 1282 | } |
| 1283 | } |
| 1284 | |
| 1285 | return true; |
| 1286 | } |
| 1287 | |
| 1288 | static bool ConEcho(std::span<std::string_view> argv) |
| 1289 | { |
nothing calls this directly
no test coverage detected