| * TTYDRV initialization code |
| #include "wine/winbase16.h" |
| DEFAULT_DEBUG_CHANNEL(ttydrv); |
| int screen_rows = 50; /* default value */ |
| int screen_cols = 80; /* default value */ |
| /*********************************************************************** |
| * TTYDRV process initialisation routine |
| static void process_attach(void) |
| WND_Driver = &TTYDRV_WND_Driver; |
| if ((root_window = initscr())) |
| getmaxyx(root_window, screen_rows, screen_cols); |
| LoadLibrary16( "display" ); |
| /*********************************************************************** |
| * TTYDRV process termination routine |
| static void process_detach(void) |
| if (root_window) endwin(); |
| /*********************************************************************** |
| * TTYDRV initialisation routine |
| BOOL WINAPI TTYDRV_Init( HINSTANCE hinst, DWORD reason, LPVOID reserved ) |
| static int process_count; |
| if (!process_count++) process_attach(); |
| if (!--process_count) process_detach(); |