int setwins(t_game *game) { struct winsize win; if (ioctl(STDOUT_FILENO, TIOCGWINSZ, &win) != -1) { game->win_w = win.ws_col; game->win_h = win.ws_row; create_wins(game); return (1); } return (0); }
void rt_init_thread_entry(void* parameter) { extern void rtgui_startup(); extern void rt_hw_lcd_init(); extern void rtgui_touch_hw_init(void); struct rtgui_app* app; app = rtgui_app_create("guiapp"); RT_ASSERT(app != RT_NULL); create_wins(app, parameter); window_focus(); rtgui_app_run(app); rtgui_app_destroy(app); rt_kprintf("app destroyed\n"); }