Usermode/AxWin3 - Fixed all compile errors, runs and cursor moves, that is all
[tpg/acess2.git] / Usermode / Applications / axwin3_src / WM / main.c
1 /*
2  * Acess2 GUI (AxWin) Version 3
3  * - By John Hodge (thePowersGang)
4  *
5  * main.c
6  * - Entrypoint
7  */
8 #include <common.h>
9 #include <acess/sys.h>
10
11 // === IMPORTS ===
12 extern void     WM_Update(void);
13 extern void     Video_Setup(void);
14
15 // === PROTOTYPES ===
16 void    ParseCommandline(int argc, char **argv);
17
18 // === GLOBALS ===
19 const char      *gsTerminalDevice = NULL;
20 const char      *gsMouseDevice = NULL;
21
22  int    giScreenWidth = 640;
23  int    giScreenHeight = 480;
24 uint32_t        *gpScreenBuffer = NULL;
25
26  int    giTerminalFD = -1;
27  int    giMouseFD = -1;
28  
29
30 // === CODE ===
31 /**
32  * \brief Program Entrypoint
33  */
34 int main(int argc, char *argv[])
35 {
36         ParseCommandline(argc, argv);
37         
38         if( gsTerminalDevice == NULL ) {
39                 gsTerminalDevice = "/Devices/VTerm/6";
40         }
41         if( gsMouseDevice == NULL ) {
42                 gsMouseDevice = "/Devices/PS2Mouse";
43         }
44         
45         Video_Setup();
46 //      Interface_Init();
47         IPC_Init();
48         Input_Init();
49         
50 //      WM_Update();
51         
52         // Main Loop
53         for(;;)
54         {
55                 fd_set  fds;
56                  int    nfds = 0;
57                 FD_ZERO(&fds);
58         
59                 Input_FillSelect(&nfds, &fds);
60                 IPC_FillSelect(&nfds, &fds);
61                 
62                 nfds ++;
63                 select(nfds, &fds, NULL, NULL, NULL);
64
65                 Input_HandleSelect(&fds);
66                 IPC_HandleSelect(&fds);
67         }
68         return 0;
69 }
70
71 void ParseCommandline(int argc, char **argv)
72 {
73         
74 }
75

UCC git Repository :: git.ucc.asn.au