Don't create the WINEPREFIX directory if it doesn't exist.
[wine/multimedia.git] / dlls / ttydrv / ttydrv_main.c
blob3014990bee1c741da448cf7f808de60eb2900792
1 /*
2 * TTYDRV initialization code
3 */
5 #include "config.h"
7 #include <stdio.h>
9 #include "winbase.h"
10 #include "wine/winbase16.h"
11 #include "gdi.h"
12 #include "user.h"
13 #include "win.h"
14 #include "debugtools.h"
15 #include "ttydrv.h"
17 DEFAULT_DEBUG_CHANNEL(ttydrv);
19 int cell_width = 8;
20 int cell_height = 8;
21 int screen_rows = 50; /* default value */
22 int screen_cols = 80; /* default value */
23 WINDOW *root_window;
26 /***********************************************************************
27 * TTYDRV process initialisation routine
29 static void process_attach(void)
31 #ifdef WINE_CURSES
32 if ((root_window = initscr()))
34 werase(root_window);
35 wrefresh(root_window);
37 getmaxyx(root_window, screen_rows, screen_cols);
38 #endif /* WINE_CURSES */
40 TTYDRV_GDI_Initialize();
42 /* load display.dll */
43 LoadLibrary16( "display" );
47 /***********************************************************************
48 * TTYDRV process termination routine
50 static void process_detach(void)
52 #ifdef WINE_CURSES
53 if (root_window) endwin();
54 #endif /* WINE_CURSES */
58 /***********************************************************************
59 * TTYDRV initialisation routine
61 BOOL WINAPI TTYDRV_Init( HINSTANCE hinst, DWORD reason, LPVOID reserved )
63 switch(reason)
65 case DLL_PROCESS_ATTACH:
66 process_attach();
67 break;
69 case DLL_PROCESS_DETACH:
70 process_detach();
71 break;
73 return TRUE;