Files
totk-pc-recomp/runtime/sysinfo.h
T
Valiantsin DzerakhandClaude Opus 5.5 c7b290f2b0 Write the log of a game run to logs\totk.log next to totk.exe when stderr is not a file
A player who starts totk.exe from Explorer or a shortcut had no log to attach to a report: the log went only to stderr.
A game run whose stderr is not a file (a console or a pipe) now also writes logs\totk.log, keeps the four earlier
runs as totk.1.log to totk.4.log, and stops the file at 64 MiB. Runs whose stderr is a file (run_game.py, 2> file) and
the tool modes write no extra file. Lines from before the file opens (mem_init comes first so the CRT heap stays out of
the guest address space) wait in a static buffer.

Crash reports, fatal errors, IPC and SVC diagnostics, guest debug output and the boot: lines now go through
rt_logf / rt_log_raw, so they reach the file too. Open log folder in the menu opens the folder of the file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 12:41:12 +03:00

22 lines
907 B
C

// What a bug report needs about the machine (runtime/sysinfo.c), for the menu's "Copy system info" and "Open log folder".
#pragma once
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
// Plain text, one item per line: OS and build, CPU, RAM, the GPU and its driver as the Vulkan device reports them, and
// every setting with a value (totk.ini, the menu, the environment). Technical text for the developers, in English like
// the log. The length written (truncated to n - 1), or 0 on failure.
int sysinfo_text(char *buf, size_t n);
// The CPU's brand string ("AMD Ryzen 7 7800X3D 8-Core Processor"); "" when the CPU has none.
void sysinfo_cpu_name(char *out, size_t n);
// The folder with the log: the folder of logs\totk.log when this run writes it, else of the file stderr goes to, else
// of totk.exe. 0 on failure.
int sysinfo_log_folder(char *out, size_t n);
#ifdef __cplusplus
}
#endif