Original Post
Hey everyone,
Alright SDL kicks ass. Getting my window setup and rendering my OpenGL code was a snap. I love it. One problem, I''m hogging the CPU.
With my Win32 code I would check the WM_ACTIVATE message for WA_CLICKACTIVE and WA_ACTIVE. If they were present I would set a boolean to true. Everytime the program loops this boolean is checked, if its true everything goes as normal, if its false then I call WaitMessage() to let Windows have some play time. Worked wonderfully and let the user task out and work without mollassas for a system.
How would I go about this with SDL. The Event system has got me kinda confused. I''ve worked out SDL_QUIT, but it is almost identical to WM_QUIT. I''ve tried polling SDL_GetAppState() and setting an active variable based on that, but it doesn''t seem to work too great and I''m sure this system would work better if integrated into the event system.
--{You fight like a dairy farmer!}