#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 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;
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;
}
+