mirror of
https://github.com/wiiu-env/wudd.git
synced 2024-11-13 13:45:07 +01:00
53 lines
1.1 KiB
C++
53 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#include <whb/log.h>
|
|
#include <whb/log_console.h>
|
|
|
|
#include <coreinit/memheap.h>
|
|
#include <coreinit/cache.h>
|
|
#include <coreinit/memfrmheap.h>
|
|
#include <coreinit/memory.h>
|
|
#include <coreinit/screen.h>
|
|
#include <proc_ui/procui.h>
|
|
#include <cstring>
|
|
#include "utils/logger.h"
|
|
|
|
#define NUM_LINES (16)
|
|
#define LINE_LENGTH (128)
|
|
#define CONSOLE_FRAME_HEAP_TAG (0x000DECAF)
|
|
#define PRINTF_BUFFER_LENGTH 2048
|
|
|
|
#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;
|
|
}; |