PayloadLoaderInstaller/source/utils/WiiUScreen.h

54 lines
1.2 KiB
C
Raw Permalink Normal View History

#pragma once
#include <whb/log.h>
#include <whb/log_console.h>
2022-07-24 17:07:42 +02:00
#include "logger.h"
#include <coreinit/cache.h>
#include <coreinit/memfrmheap.h>
2022-07-24 17:07:42 +02:00
#include <coreinit/memheap.h>
#include <coreinit/memory.h>
#include <coreinit/screen.h>
#include <cstring>
2022-07-24 17:07:42 +02:00
#include <proc_ui/procui.h>
2022-07-24 17:07:42 +02:00
#define NUM_LINES (16)
#define LINE_LENGTH (128)
#define CONSOLE_FRAME_HEAP_TAG (0x000DECAF)
2022-07-24 17:07:42 +02:00
#define PRINTF_BUFFER_LENGTH 2048
2022-07-24 17:07:42 +02:00
#define DEBUG_CONSOLE_LOG(FMT, ARGS...) \
do { \
DEBUG_FUNCTION_LINE(FMT, ##ARGS); \
WiiUScreen::drawLinef(FMT, ##ARGS); \
} while (0)
class WiiUScreen {
public:
static uint32_t ProcCallbackAcquired(void *context);
static uint32_t ProcCallbackReleased(void *context);
static bool Init();
static void DeInit();
static void drawLinef(const char *fmt, ...);
static void drawLine(const char *fmt);
static void drawLine();
static void flipBuffers();
static void clearScreen();
private:
static void *sBufferTV, *sBufferDRC;
static uint32_t sBufferSizeTV, sBufferSizeDRC;
static bool sConsoleHasForeground;
static uint32_t consoleColor;
static uint32_t consoleCursorY;
2020-10-14 13:54:25 +02:00
};