Game loop in Win32 API

Posted by nXqd on Stack Overflow See other posts from Stack Overflow or by nXqd
Published on 2010-05-12T08:35:01Z Indexed on 2010/05/12 11:34 UTC
Read the original article Hit count: 285

Filed under:
|

I'm creating game mario like in win32 GDI . I've implemented the new loop for game :

PeekMessage(&msg,NULL,0,0,PM_NOREMOVE);

while (msg.message!=WM_QUIT)
{
    if (PeekMessage(&msg,NULL,0,0,PM_REMOVE)) {
        TranslateMessage(&msg);
        DispatchMessage(&msg);
    }
    else // No message to do
    {
        gGameMain->GameLoop();  
    }
}

But my game just running until I press Ctrl + Alt + Del ( mouse cursor is rolling ).

© Stack Overflow or respective owner

Related posts about gdi+

Related posts about c++