mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-13 14:44:23 -04:00
fusee_cpp: Implement fatal display, reading of fusee-secondary
This commit is contained in:
parent
ee1d1ea527
commit
1a8f886a6e
32 changed files with 24337 additions and 48 deletions
|
@ -101,28 +101,26 @@ namespace ams::nxboot {
|
|||
g_row = 0;
|
||||
|
||||
/* Clear the console. */
|
||||
/* TODO: Assume it's already cleared? */
|
||||
std::memset(g_frame_buffer, 0, FrameBufferSize);
|
||||
}
|
||||
|
||||
void Print(const char *fmt, ...) {
|
||||
void VPrint(const char *fmt, std::va_list vl) {
|
||||
/* Generate the string. */
|
||||
char log_str[1_KB];
|
||||
{
|
||||
std::va_list vl;
|
||||
va_start(vl, fmt);
|
||||
util::TVSNPrintf(log_str, sizeof(log_str), fmt, vl);
|
||||
va_end(vl);
|
||||
}
|
||||
util::TVSNPrintf(log_str, sizeof(log_str), fmt, vl);
|
||||
|
||||
/* Print each character. */
|
||||
const size_t len = std::strlen(log_str);
|
||||
for (size_t i = 0; i < len; ++i) {
|
||||
PutChar(log_str[i]);
|
||||
}
|
||||
}
|
||||
|
||||
/* Flush the console. */
|
||||
hw::FlushDataCache(g_frame_buffer, FrameBufferSize);
|
||||
void Print(const char *fmt, ...) {
|
||||
std::va_list vl;
|
||||
va_start(vl, fmt);
|
||||
VPrint(fmt, vl);
|
||||
va_end(vl);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue