X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Usermode%2FApplications%2Faxwin3_src%2FWM%2Fmain.c;h=105039539b4470d5e5d76762ce5ca712f338c96b;hb=cd0f6c2fa183794952178fa4a5c90485055e12bb;hp=a9266b41e955f562b0535e09d82fcb9f563c7380;hpb=27cb4fff4ed854d8be598a1157265c6de8aa035a;p=tpg%2Facess2.git diff --git a/Usermode/Applications/axwin3_src/WM/main.c b/Usermode/Applications/axwin3_src/WM/main.c index a9266b41..10503953 100644 --- a/Usermode/Applications/axwin3_src/WM/main.c +++ b/Usermode/Applications/axwin3_src/WM/main.c @@ -9,18 +9,13 @@ #include #include #include -#include +#include +#include "include/lowlevel.h" // === IMPORTS === extern void Video_Setup(void); extern void WM_Initialise(void); -extern int Renderer_Menu_Init(void); -extern int Renderer_Widget_Init(void); -extern int Renderer_Background_Init(void); -extern int Renderer_Framebuffer_Init(void); -extern int Renderer_RichText_Init(void); extern void WM_Update(void); -extern void WM_Hotkey_Register(int nKeys, uint32_t *Keys, const char *ActionName); // === PROTOTYPES === void ParseCommandline(int argc, char **argv); @@ -61,21 +56,7 @@ int main(int argc, char *argv[]) IPC_Init(); Input_Init(); - Renderer_Menu_Init(); - Renderer_Widget_Init(); - Renderer_Background_Init(); - Renderer_Framebuffer_Init(); - Renderer_RichText_Init(); WM_Initialise(); - - // TODO: Move these to config - uint32_t keys[4]; - keys[0] = KEYSYM_LEFTGUI; keys[1] = KEYSYM_r; - WM_Hotkey_Register(2, keys, "Interface>Run"); - keys[0] = KEYSYM_LEFTGUI; keys[1] = KEYSYM_t; - WM_Hotkey_Register(2, keys, "Interface>Terminal"); - keys[0] = KEYSYM_LEFTGUI; keys[1] = KEYSYM_e; - WM_Hotkey_Register(2, keys, "Interface>TextEdit"); // Spawn interface root if( !gbNoSpawnUI ) @@ -98,22 +79,24 @@ int main(int argc, char *argv[]) for(;;) { fd_set fds; + fd_set efds; int nfds = 0; FD_ZERO(&fds); + FD_ZERO(&efds); WM_Update(); Input_FillSelect(&nfds, &fds); - IPC_FillSelect(&nfds, &fds); + IPC_FillSelect(&nfds, &fds, &efds); nfds ++; - if( _SysSelect(nfds, &fds, NULL, NULL, NULL, THREAD_EVENT_IPCMSG) == -1 ) { + if( _SysSelect(nfds, &fds, NULL, &efds, NULL, THREAD_EVENT_IPCMSG) == -1 ) { _SysDebug("ERROR: select() returned -1"); return -1; } Input_HandleSelect(&fds); - IPC_HandleSelect(&fds); + IPC_HandleSelect(&fds, &efds); } return 0; }