2 * Acess2 GUI (AxWin) Version 3
3 * - By John Hodge (thePowersGang)
14 extern void Video_Setup(void);
15 extern void WM_Initialise(void);
16 extern int Renderer_Menu_Init(void);
17 extern int Renderer_Widget_Init(void);
18 extern int Renderer_Background_Init(void);
19 extern void WM_Update(void);
22 void ParseCommandline(int argc, char **argv);
25 const char *gsTerminalDevice = NULL;
26 const char *gsMouseDevice = NULL;
28 int giScreenWidth = 640;
29 int giScreenHeight = 480;
31 int giTerminalFD = -1;
34 #define __INSTALL_ROOT "/Acess/Apps/AxWin/3.0"
36 const char *gsInstallRoot = __INSTALL_ROOT;
40 * \brief Program Entrypoint
42 int main(int argc, char *argv[])
44 int server_tid = gettid();
46 ParseCommandline(argc, argv);
48 if( gsTerminalDevice == NULL ) {
49 gsTerminalDevice = "/Devices/VTerm/6";
51 if( gsMouseDevice == NULL ) {
52 gsMouseDevice = "/Devices/PS2Mouse";
61 Renderer_Widget_Init();
62 Renderer_Background_Init();
65 // Spawn interface root
66 if( clone(CLONE_VM, 0) == 0 )
68 static char csInterfaceApp[] = __INSTALL_ROOT"/AxWinUI";
69 char server_info[] = "AXWIN3_SERVER=00000";
70 char *envp[] = {server_info, NULL};
71 char *argv[] = {csInterfaceApp, NULL};
72 _SysDebug("server_tid = %i, &server_tid = %p", server_tid, &server_tid);
73 sprintf(server_info, "AXWIN3_SERVER=%i", server_tid);
74 execve(csInterfaceApp, argv, envp);
87 Input_FillSelect(&nfds, &fds);
88 IPC_FillSelect(&nfds, &fds);
91 if( select(nfds, &fds, NULL, NULL, NULL) == -1 ) {
92 _SysDebug("ERROR: select() returned -1");
96 Input_HandleSelect(&fds);
97 IPC_HandleSelect(&fds);
102 void ParseCommandline(int argc, char **argv)