Usermode/AxWin3 - Added keysyms (symlink to kernel version)
[tpg/acess2.git] / Usermode / Applications / axwin2_src / WM / main.c
index 7b42562..48e47ff 100644 (file)
@@ -6,15 +6,12 @@
 #include <acess/sys.h>
 
 // === IMPORTS ===
-extern void    ParseCommandline(int argc, char *argv[]);
-extern void    Video_Setup(void);
 extern void    WM_Update(void);
-extern void    Messages_PollIPC(void);
-extern void    Interface_Init(void);
+extern int     Input_Init(void);
 
 // === GLOBALS ===
-char   *gsTerminalDevice = NULL;
-char   *gsMouseDevice = NULL;
+const char     *gsTerminalDevice = NULL;
+const char     *gsMouseDevice = NULL;
 
  int   giScreenWidth = 640;
  int   giScreenHeight = 480;
@@ -35,17 +32,33 @@ int main(int argc, char *argv[])
        if( gsTerminalDevice == NULL ) {
                gsTerminalDevice = "/Devices/VTerm/6";
        }
+       if( gsMouseDevice == NULL ) {
+               gsMouseDevice = "/Devices/PS2Mouse";
+       }
        
        Video_Setup();
        Interface_Init();
+       IPC_Init();
+       Input_Init();
        
        WM_Update();
        
        // Main Loop
        for(;;)
        {
-               Messages_PollIPC();
-               //yield();
+               fd_set  fds;
+                int    nfds = 0;
+               FD_ZERO(&fds);
+       
+               Input_FillSelect(&nfds, &fds);
+               IPC_FillSelect(&nfds, &fds);
+               
+               nfds ++;
+               select(nfds, &fds, NULL, NULL, NULL);
+
+               Input_HandleSelect(&fds);
+               IPC_HandleSelect(&fds);
        }
        return 0;
 }
+

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