diff options
Diffstat (limited to 'src/gwin/console.c')
-rw-r--r-- | src/gwin/console.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gwin/console.c b/src/gwin/console.c index 38e2ea8b..39e534b4 100644 --- a/src/gwin/console.c +++ b/src/gwin/console.c @@ -60,19 +60,21 @@ static void AfterClear(GWindowObject *gh) { static const gwinVMT consoleVMT = { "Console", // The classname + sizeof(GConsoleObject), // The object size 0, // The destroy routine 0, // The redraw routine AfterClear, // The after-clear routine }; -GHandle gwinCreateConsole(GConsoleObject *gc, coord_t x, coord_t y, coord_t width, coord_t height) { - if (!(gc = (GConsoleObject *)_gwindowCreate((GWindowObject *)gc, x, y, width, height, sizeof(GConsoleObject), &consoleVMT, GWIN_FLG_VISIBLE))) +GHandle gwinCreateConsole(GConsoleObject *gc, GWindowInit *pInit) { + if (!(gc = (GConsoleObject *)_gwindowCreate(&gc->g, pInit, &consoleVMT, 0))) return 0; #if GFX_USE_OS_CHIBIOS && GWIN_CONSOLE_USE_BASESTREAM gc->stream.vmt = &GWindowConsoleVMT; #endif gc->cx = 0; gc->cy = 0; + gwinSetVisible((GHandle)gc, pInit->show); return (GHandle)gc; } |