allow console on either screen
This commit is contained in:
parent
d6a58d4a2f
commit
a39890ef48
@ -123,10 +123,11 @@ PrintConsole* consoleGetDefault(void);
|
|||||||
PrintConsole *consoleSelect(PrintConsole* console);
|
PrintConsole *consoleSelect(PrintConsole* console);
|
||||||
|
|
||||||
/*! \brief Initialise the console.
|
/*! \brief Initialise the console.
|
||||||
|
\param screen The screen to use for the console
|
||||||
\param console A pointer to the console data to initialze (if it's NULL, the default console will be used)
|
\param console A pointer to the console data to initialze (if it's NULL, the default console will be used)
|
||||||
\return A pointer to the current console.
|
\return A pointer to the current console.
|
||||||
*/
|
*/
|
||||||
PrintConsole* consoleInit(PrintConsole* console);
|
PrintConsole* consoleInit(gfxScreen_t screen, PrintConsole* console);
|
||||||
|
|
||||||
//! Clears the screan by using iprintf("\x1b[2J");
|
//! Clears the screan by using iprintf("\x1b[2J");
|
||||||
void consoleClear(void);
|
void consoleClear(void);
|
||||||
|
@ -342,7 +342,7 @@ static const devoptab_t dotab_null = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------
|
||||||
PrintConsole* consoleInit(PrintConsole* console) {
|
PrintConsole* consoleInit(gfxScreen_t screen, PrintConsole* console) {
|
||||||
//---------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------
|
||||||
|
|
||||||
static bool firstConsoleInit = true;
|
static bool firstConsoleInit = true;
|
||||||
@ -367,9 +367,14 @@ PrintConsole* consoleInit(PrintConsole* console) {
|
|||||||
|
|
||||||
console->consoleInitialised = 1;
|
console->consoleInitialised = 1;
|
||||||
|
|
||||||
gfxSetScreenFormat(GFX_BOTTOM,GSP_RGB565_OES);
|
gfxSetScreenFormat(screen,GSP_RGB565_OES);
|
||||||
gfxSetDoubleBuffering(GFX_BOTTOM,false);
|
gfxSetDoubleBuffering(screen,false);
|
||||||
console->frameBuffer = (u16*)gfxGetFramebuffer(GFX_BOTTOM, GFX_LEFT, NULL, NULL);
|
console->frameBuffer = (u16*)gfxGetFramebuffer(screen, GFX_LEFT, NULL, NULL);
|
||||||
|
|
||||||
|
if(screen==GFX_TOP) {
|
||||||
|
console->consoleWidth = 50;
|
||||||
|
console->windowWidth = 50;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
consoleCls('2');
|
consoleCls('2');
|
||||||
|
Loading…
Reference in New Issue
Block a user