#44625 - strager - Fri Jun 03, 2005 7:35 pm
I have a main loop like so:
Everything works fine, except that when no button is pressed, the screen is not rendered. Could it be a problem with my declaration? Or maybe the structure is incorrect. Either way, I am seeking the answer.
Thanks.
Code: |
while(1) { static int render = 1; if(render == 1) { render_gfx(); render = 0; }; /* Get key input */ { u16 old = KEYINPUT; while(KEYINPUT == old) /* DO NOTHING */; } /* Process key input */ if(PRESSED(BTN_A)) { do_btn_a(); render = 1; }; }; |
Everything works fine, except that when no button is pressed, the screen is not rendered. Could it be a problem with my declaration? Or maybe the structure is incorrect. Either way, I am seeking the answer.
Thanks.