Re: esc detector wont run -- 'out of scope'
Brian Puthuff <[email protected]> Fri, 17 Mar 2017 15:58:33 -0700
| Newsgroups | gmane.comp.lib.sdl |
|---|---|
| Message-ID | <CAPh_eMFnERnmEZko8by0iZfW_8urPbsuEx3FBUvDm5U-JMn=jw@mail.gmail.com> |
--===============0324214014805542825== Content-Type: multipart/alternative; boundary=001a1146f402f9a5ec054af51df7 --001a1146f402f9a5ec054af51df7 Content-Type: text/plain; charset=UTF-8 Try: while(SDL_PollEvent(&event)) ... Instead of using an if statement. That will loop through the event queue on each iteration of the main while loop. On Mar 17, 2017 3:44 PM, "speartip" <[email protected]> wrote: Sorry: forgot to post output: flag 1 flag 1 flag 1 flag 1 flag 1 flag 1 flag 1 .....ad infinitum gameRunning is never set to false _______________________________________________ SDL mailing list [email protected] http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org --001a1146f402f9a5ec054af51df7 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"auto">Try:<div dir=3D"auto"><br></div><div dir=3D"auto">while(S= DL_PollEvent(&event)) ...</div><div dir=3D"auto"><br></div><div dir=3D"= auto">Instead of using an if statement.</div><div dir=3D"auto"><br></div><d= iv dir=3D"auto"><div dir=3D"auto">That will loop through the event queue on= each iteration of the main while loop.</div><div dir=3D"auto"><br></div><d= iv dir=3D"auto"><div class=3D"gmail_extra" dir=3D"auto"><br><div class=3D"g= mail_quote">On Mar 17, 2017 3:44 PM, "speartip" <<a href=3D"ma= ilto:[email protected]">[email protected]</a>> wrote:<br type=3D= "attribution"><blockquote class=3D"quote" style=3D"margin:0 0 0 .8ex;border= -left:1px #ccc solid;padding-left:1ex"><u></u> <div> <div class=3D"m_7804152248261649096postbody">Sorry: forgot to post output:= <br> flag 1<br> flag 1<br> flag 1<br> flag 1<br> flag 1<br> flag 1<br> flag 1<br> .....ad infinitum<br> <br> gameRunning is never set to false</div> </div> <br>______________________________<wbr>_________________<br> SDL mailing list<br> <a href=3D"mailto:[email protected]">[email protected]</a><br> <a href=3D"http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org" rel=3D"nore= ferrer" target=3D"_blank">http://lists.libsdl.org/<wbr>listinfo.cgi/sdl-lib= sdl.org</a><br> <br></blockquote></div><br></div></div></div></div> --001a1146f402f9a5ec054af51df7-- --===============0324214014805542825== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ SDL mailing list [email protected] http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org --===============0324214014805542825==--